手机
当前位置:查字典教程网 >网页设计 >XHTML >顶部固定div可设置半透明效果
顶部固定div可设置半透明效果
摘要:顶部固定html,body{overflow:hidden;margin:0px;width:100%;height:100%;}.virt...

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

<title>顶部固定</title>

<style type="text/css">

html,body {overflow:hidden;margin:0px;width:100%;height:100%;}

.virtual_body {width:100%;height:100%;overflow-y:scroll;overflow-x:auto;}

.fixed_div {position:absolute;z-index:2008;top:0px;left:0px;right:16px;height:40px;background:#CCCCCC;border-bottom:3px inset;border-color:#006699;

//bottom:20px;

//border:1px solid red;

//border-style:inset;

//半透明效果制作

//filter:alpha(opacity=50);

//-moz-opacity:0.5;

//opacity:0.5;

//background:#666666;

}

</style>

</head>

<body>

<div><font color="red">郑州大学</font></div>

<div>

<div>

<p>

再见,我一定会回来看你的!

</div>

</div>

</body>

</html>

效果图如下:

1

【顶部固定div可设置半透明效果】相关文章:

HTML弹出透明层事例大小可以设置也可以比例化

HTML网页头部代码实例详解

disabled不可输入的值无法传递到action层

marquee元素实现滚动字体图片滑动等效果

用按钮触发事件的方式实现背景色的闪烁效果

网页输入框的样式触发效果

html文件的中文乱码问题与在浏览器中的显示问题

用CSS对TD中INPUT的宽度设置

HTML标记一览表及用法说明

HTML 网页页面切换的各种变换效果

精品推荐
分类导航