CSS制作浮动框带遮罩效果

前端之家收集整理的这篇文章主要介绍了CSS制作浮动框带遮罩效果前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

下面是编程之家 jb51.cc 通过网络收集整理的代码片段。

编程之家小编现在分享给大家,也给大家做个参考。

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<Meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>DIV层居中遮罩</title>
<style>
#overlay {
position:absolute;
top:0;
left:0;
width:100%;
height:100%;
background:#000;
opacity:0.5;
filter:alpha(opacity=50);
}
#win {
position:absolute;
top:50%;
left:50%;
width:400px;
height:200px;
background:#fff;
margin:-102px 0 0 -202px;
line-height: 200px;
text-align: center;
border: 4px solid #CCC;
}
</style>
<script>
</script>
</head>
<body>
<div id="overlay"></div>
<div id="win">层居中:)更多:<a href='http://www.iiwnet.com'>网页特效</a></div>
</body>
</html>

以上是编程之家(jb51.cc)为你收集整理的全部代码内容,希望文章能够帮你解决所遇到的程序开发问题。

如果觉得编程之家网站内容还不错,欢迎将编程之家网站推荐给程序员好友。

猜你在找的HTML相关文章