Home > Web Front-end > HTML Tutorial > The fixed div at the top can be set to have a translucent effect

The fixed div at the top can be set to have a translucent effect

高洛峰
Release: 2017-02-23 13:28:41
Original
2460 people have browsed it

This article introduces you to a div with a fixed top that can be set to a translucent effect. There is a rendering at the end of the article. You can refer to the

nbsp;html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> 
 
 
<meta> 
<title>顶部固定</title> 
<style> 
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> 
 
 
<div><font>郑州大学</font></div> 
<div> 
<div> 
<p> 


再见,我一定会回来看你的! 
</p>
</div> 
</div> 
 
Copy after login

The rendering is as follows:

The fixed div at the top can be set to have a translucent effect


For more articles related to the top fixed div that can be set to a translucent effect, please pay attention to the PHP Chinese website!


Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template