The webpage layout now uses DIV + CSS. To make the webpage layout look good, you need to set a fixed position for some DIV layers and scroll without following the browser's scroll bar. For Beginners, setting the CSS code for such a DIV layer is a little difficult. I am also a newbie. I spent some time studying the CSS code. Now I want to share it with the webmaster who needs it, use this CSS style code to set the DIV layer to be fixed anywhere on the page
The code for DIV + CSS is as follows:
<Style> # box {height: 45px;/* height */background: # 488fce;/* background Color */width: 100%;/* width */position: fixed; /* fixed Layer */top: 0px;/* this is the top distance. To set bottom: 0 at the bottom, to show left: Numeric px, right: on the left or right: value: px */filter: alpha (Opacity = 80);-moz-opacity: 0.8; opacity: 0.8; z-index: 100; /* set the transparency of the DIV Layer */} </style> <div id = "box"> <div style = "width: 960px; "> This is a DIV fixed layer </div> <div style =" text-align: center; margin: 30px 0 0 0; ">
Tip: the code can be modified before running!