In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-26 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces the relevant knowledge of css page layout case analysis, the content is detailed and easy to understand, the operation is simple and fast, and it has a certain reference value. I believe you will gain something after reading this css page layout case analysis article. Let's take a look at it.
Position:static
Ignore top/bottom/left/right or z-index
Position:relative
Elements that set relative positioning will not deviate from the document stream
Position:fixed
Will not scroll as the viewport scrolls, inheriting the characteristics of absolute
Position:sticky
When paired with the top attribute, you can set the adsorption navigation effect, but the compatibility is not ideal.
Demo * {margin:0;padding:0;} div {width:100%;} .banner {text-align: center;background-color:#f2f4f6;padding:100px 0;} .nav {text-align: center;border:1px solid # 333 control position: sticky;top:0;background-color:#abcdef;padding:20px 0;} .content {width:60%;margin:50px auto;} p {margin-bottom:50px;} this is advertising image navigation | Navigation | Navigation
Position:sticky is a new attribute of css positioning; it can be said to be the combination of relative positioning relative and fixed positioning fixed; it is mainly used to monitor scroll events; to put it simply, in the sliding process, when the distance between an element and its parent element meets the requirements of sticky viscous positioning (such as top:100px); the effect of position:sticky is equivalent to fixed positioning, fixed to the appropriate position.
Position:sticky is a new attribute of css positioning; it can be said to be the combination of relative positioning relative and fixed positioning fixed; it is mainly used to monitor scroll events; to put it simply, in the sliding process, when the distance between an element and its parent element meets the requirements of sticky viscous positioning (such as top:100px); the effect of position:sticky is equivalent to fixed positioning, fixed to the appropriate position.
Position:sticky is a new attribute of css positioning; it can be said to be the combination of relative positioning relative and fixed positioning fixed; it is mainly used to monitor scroll events; to put it simply, when the distance between an element and its parent element meets the requirements of sticky viscous positioning during sliding (such as top:100px); the effect of position:sticky is equivalent to fixed positioning and fixed to the appropriate position.
Position:sticky is a new attribute of css positioning; it can be said to be the combination of relative positioning relative and fixed positioning fixed; it is mainly used to monitor scroll events; to put it simply, in the sliding process, when the distance between an element and its parent element meets the requirements of sticky viscous positioning (such as top:100px); the effect of position:sticky is equivalent to fixed positioning, fixed to the appropriate position.
Position:sticky is a new attribute of css positioning; it can be said to be the combination of relative positioning relative and fixed positioning fixed; it is mainly used to monitor scroll events; to put it simply, when the distance between an element and its parent element meets the requirements of sticky viscous positioning during sliding (such as top:100px); the effect of position:sticky is equivalent to fixed positioning and fixed to the appropriate position.
Position:sticky is a new attribute of css positioning; it can be said to be the combination of relative positioning relative and fixed positioning fixed; it is mainly used to monitor scroll events; to put it simply, when the distance between an element and its parent element meets the requirements of sticky viscous positioning during sliding (such as top:100px); the effect of position:sticky is equivalent to fixed positioning and fixed to the appropriate position.
Position:sticky is a new attribute of css positioning; it can be said to be the combination of relative positioning relative and fixed positioning fixed; it is mainly used to monitor scroll events; to put it simply, when the distance between an element and its parent element meets the requirements of sticky viscous positioning during sliding (such as top:100px); the effect of position:sticky is equivalent to fixed positioning and fixed to the appropriate position.
Left fixed three-level navigation demo:
Demo * {margin:0;padding:0;} .page {width:100%;} .nav {position: fixed;top:50%;left:0;width:160px;height:205px;margin-top:-102.5px;}. Nav-li {width:100%;/*height:40px;*/line-height:40px;text-align:center;color:#fff;background:#333;border-bottom:1px solid # fff;cursor: pointer;}. Nav-li:hover ul {display: block } .title {width:100%;height:40px;} .nav-li ul {width:100%;background-color: # fff;display: none;}. Nav-li ul li {width:100%;height:40px;line-height:40px;text-align:center;color:#333;border-bottom:1px dashed # 666 position: relative;}. Nav-li ul li:hover .list3 {display: block;} .list3 {width:100%;position: absolute;top:0;left:160px;display: none } .item3 {width:100%;height:40px;line-height:40px;text-align:center;background:#444;color:#fff;border-bottom:1px dashed # 666 } first-level navigation 1 second-level navigation 1 third-level navigation 1 third-level navigation 2 third-level navigation 3 Three-level navigation 4 two-level navigation two-level navigation one three-level navigation two three-level navigation three-level navigation four Secondary navigation 2 three-level navigation 1 three-level navigation 2 three-level navigation 3 three-level navigation 4 Secondary navigation 2 three-level navigation 1 three-level navigation 2 three-level navigation 3 three-level navigation 4 First level navigation 1 second level navigation 1 third level navigation 1 third level navigation 2 third level navigation 3 third-level navigation 4 secondary navigation 2 secondary navigation 3 secondary navigation 4 primary navigation 1 Second-level navigation 1 three-level navigation one three-level navigation two three-level navigation three-level navigation four Secondary navigation 2 secondary navigation 3 secondary navigation 4 primary navigation 1 secondary navigation 1 tertiary navigation 1 three-level navigation 2 three-level navigation 3 three-level navigation 4 secondary navigation 2 secondary navigation 3 Secondary navigation 4 primary navigation 1 secondary navigation 1 tertiary navigation 1 tertiary navigation 2 tertiary navigation 3 Tertiary navigation 4 secondary navigation 2 secondary navigation 3 secondary navigation 4
Html+css web page project layout demo:
Demo * {margin:0;padding:0;} header {width:100%;height:100px;} header img {width:300px;height:85px;padding-left:100px;padding-top:8px;} .logo {float:left;} .nav {float:right;} .nav ul {padding-right:100px;} .nav ul li {float:left; list-style: none;width:80px;height:100px;line-height:100px;color:#333;} .main {position: relative } .top {width:100%;height:600px;} .top img {width:100%;height:100%;} .topLayer {width:100%;height:600px;position: absolute;background-color: # 000position opacity: .5Tracing topplan 0There left0;} .topLayer-top {width:500px;height:300px;position: absolute;top:280px;margin-top:-150px;z-index:2;left:50%;margin-left:-250px;} .word {padding-top:100px TopLayer-top button {width:200px;height:60px;margin-top:50px;color:#fff;background-color: # f5704f: bold;text-align: center;}. TopLayer-top button {width:200px;height:60px;margin-top:50px;color:#fff;background-color: # f5704f; topLayer-top button {background-color: # fff;color:#f5704f;border: 1px solid # f5704f; background-color: # fff;color:#f5704f;border: 1px solid # f5704f } .middle {width:1000px;margin:0 auto;} .common {float: left;width:33.3%;padding-top:50px;text-align: center;} .common img {width:100px;height:100px;} .com {font-size:20px;color:#7d7c7f;/*font-weight:bold;*/padding-top:20px;}. M-middle {font-size:22px;color:#e19796;font-weight:bold;padding-top:50px;font-style: italic;text-align: center Padding-bottom:50px;} .clear {clear:both;}. M-bottom {margin-bottom:20px;}. M-com {float: left;padding:10px;text-align: center;}. M-com img {width:310px;height:260px;} .des1 {font-size:20px;color:#7d7d7f;padding-top:20px;} .des2 {font-size:20px;color:#bdbdbc;padding-top:20px;} .bottom {background-color: # f9f9f9tpaddingMutom30px } .bottom .content {width:1000px;margin:0 auto;} .content .title {text-align: center;font-size: 20pxbetrotolution7d7c7f pic-content dd 50px 0 30px 0pic-content dd {width:470px;float: left;margin:10px 12px;} .pic-content dl img {width:470px;height:460px;} .title {padding-top:15px;font-size: 16pxcolorantor displacement 7d7c7f;} footer {width:100%;height:100px Background-color: # 292c35: colormistmistf: Font: Font: 15pxbot text: align: center;line-height:100px;}
Home page pictures, video notes
MY BEAUTIFUL LIFE LOOK MORE >
MICROBLOG
QQ "I want to give good things to record down
After the recall will be very beautiful. "
Cool Image Record The Picture
Great Picture Record The Picture
Cool Image Record The Picture FROM THE PHOTO ALBUM
Life is like a book, just read more and more refined, more write more carefully. When read, mind open, all things have been indifferent to heart. Life is the precipitation.
Life is like a cup of tea, let people lead a person to endless aftertastes. You again good taste, it will always have a different taste, different people will have different taste more. ©2019 test.com record number xxxxxxxx on "css web page layout case analysis" this article is introduced here, thank you for reading! I believe you all have a certain understanding of the knowledge of "css Page layout case study". If you want to learn more, you are welcome to follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.