建站软件 优化软件 编程软件 网页辅助 站群程序 网站程序 图像处理 资源教程 字体下载 推荐软件


您的位置:首页 > div+css > css解决body背景层高于块元素

css解决body背景层高于块元素

时间:2015-03-20 11:10:28  来源:免费模板网 作者:风雪 阅读次数 tagscss运用

根据显示顺序  有的图片想盖在其他图片上面  可以设置z-index的值
本文实例讲述了CSS实现body背景层高于块元素的方法,分享给大家供大家参考。具体实现方法如下:

 

复制代码代码如下: 

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<!DOCTYPE html> 
<html
<head
<meta charset="UTF-8">  
<title>demo-www.zzarea.com</title
<meta name="viewport"  content="width=device-width, initial-scale=1.0, minimum-scale=1.0,  maximum-scale=1.0, user-scalable=no, minimal-ui"
</head>  
<style
html, body{ 
width: 100%; 
max-width: 640px;  
height: 100%; 
overflow-x: hidden; 
margin: 0 auto;  
background-color: #000; 
font-family: 微软雅黑, 华文细黑, 黑体; 
body{  
background-image: url('img/person1.png'); 
background-repeat: no-repeat;  
background-position: bottom; 
background-color: transparent;  
background-size: 100%; 
.box{ 
width: 100%; 
height: 50%;  
background-color: green; 
z-index: -1; 
position: absolute; 
}  
</style
<body
<div></div>  
</body
</html>
 

本文地址:https://www.freemoban.com/bjrm/2015/0320/999.html

猜你喜欢
栏目推荐
模板推荐

Copyright:www.freemoban.com 免费模板网 All Rights Reserved 网站备案:辽ICP备19014872号-2   辽公网安备 21010602000376号  辽公网安备:42900402000182号

免责声明:本站部分资源来自互联网收集,版权归原创者所有,如果侵犯了你的权益,我们会及时删除侵权内容,联系QQ:1615187561 谢谢合作!