background 全屏解决方法
来源:互联网 发布:项目数据分析公司排名 编辑:程序博客网 时间:2024/06/07 07:06
<body><!-- 背景层 --><div class="bg"></div></body>html, body { width: 100%; height: 100%;}body { overflow: hidden; position: relative;}.bg { position: absolute; left: 0; top: 0; z-index: 0; width: 100%; height: 100%; background: url('page_1.jpg') no-repeat center center fixed;}
1.背景图片设置全屏CSS方法(推荐使用)
html{ background: url('images/page1.jpg') no-repeat center center fixed; -webkit-background-size: cover; -moz-background-size: cover; -o-background-size: cover; background-size: cover;}
2.背景图片设置全屏 图片层方法
注意:此方法图片会拉伸失真
<body> <img src="images/page1.jpg" width='100%' height='100%' class="bgimg"></body>.bgimg{ position: fixed; left:0px; top:0px; margin:auto; width:100%; height:100%; z-index:-1;}
3.给背景图片设置一层透明的蒙住的版
<body> <div class="cover"></div></body>.cover{ position: fixed; left:0px; top:0px; z-index: -1; opacity: 0.6; height: 100%; width: 100%; background: black;}
1 0
- background 全屏解决方法
- 树莓派有黑边不能全屏解决方法
- Linerlayout background selector无效解决方法
- 完美的背景图全屏css代码 – background-size:cover?
- 完美的背景图全屏css代码 – background-size:cover?
- 完美的背景图全屏css代码 – background-size:cover
- 完美的背景图全屏css代码 – background-size:cover?
- ppstream不能全屏的解决方法
- ScrollView不能充满全屏解决方法
- android:background 图片被拉伸解决方法
- background
- background
- background
- BackGround
- background
- background
- background
- background
- 51nod 1031 骨牌覆盖
- 权当是日记吧
- CentOS关闭休眠和屏保模式
- Kotlin在Android工程中的应用
- hexo博客搭建并上传github
- background 全屏解决方法
- 二叉树的遍历(Tree Traversals)参考极客
- 【博财老师】油价首次收线50之上,实时策略跟进
- 个人感想
- 基础SSH注解方式配置(ST2.1,SP3.1H4.14,JAVAEE6.0 JAVASE1.7)
- mysql —— 分表分区
- Number of 1 Bits
- 制作Swift Framework
- java处理日期时间的方法