响应式布局的简单案例
网站建设 2023-01-28 21:38www.1681989.com免费网站
响应式布局
响应式布局在面对不同分辨率设备灵活性强,在平时的网页设计中基本上都要用到响应式布局设计,它给我们提供了良好的用户浏览页面,能带给我们更好的客户体验,狼蚁网站SEO优化给大家分享下我做的一个简单的响应式的布局
不同的页面会适用不同大小浏览器页面,它会随着分辨率的变化而变化。代码展示如下
XML/HTML Code复制内容到剪贴板
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="utf-8" />
- <title></title>
- <style>
- p{
- font-size: 12px;
- }
- header{
- width: 100%;
- }
- header img{
- width: 100%;
- }
- @media (m-width: 1300px) and (max-width:1400px) {
- #left{
- float: left;
- width: 30%;
- marg: 0px 50px;
- }
- #left #logo-bg{
- marg: 10% 10%;
- width: 80%;
- position: relative;
- }
- #left #logo{
- float: left;
- width: 12%;
- position: absolute;
- left: 13%;
- : 230px;
- }
- #left p{
- marg-bottom: -20px;
- }
- #left p,h4{
- text-align: center;
- color: red;
- }
- #right{
- float: left;
- width: 60%;
- marg: 15% 0px;
- }
- #right h2{
- text-align: center;
- }
- #right fieldset{
- text-align: center;
- border-left: none;
- border-right: none;
- border-bottom: none;
- }
- #right fieldset legend{
- paddg: 0px 20px;
- }
- #fen{
- width: 100%;
- -webkit-column-count: 6;
- -moz-column-count: 6;
- -o-column-count: 6;
- -ms-column-count: 6;
- column-count: 6;
- -webkit-column-gap: 1em;
- -moz-column-gap: 1em;
- -o-column-gap: 1em;
- -ms-column-gap: 1em;
- column-gap: 1em;
- }
- #fen img{
- width: 100%;
- border-radius: 10px 10px 10px 10px;
- }
- #fen p,h4{
- text-align: center;
- color: red;
- }
- #fen p{
- marg-bottom: -20px;
- }
- #di p{
- text-align: center;
- }
- #di p span{
- color: red;
- }
- }
- @media (m-width: 1000px) and (max-width:1300px){
- #left{
- float: left;
- width: 30%;
- marg: 0px 50px;
- }
- #left #logo-bg{
- marg: 10% 10%;
- width: 80%;
- position: relative;
- }
- #left #logo{
- width: 12%;
- position: absolute;
- left: 14%;
- : 190px;
- }
- #left p{
- marg-bottom: -20px;
- }
- #left p,h4{
- text-align: center;
- color: red;
- }
- #right{
- float: left;
- width: 60%;
- marg: 15% 0px;
- }
- #right h2{
- text-align: center;
- }
- #right fieldset{
- text-align: center;
- border-left: none;
- border-right: none;
- border-bottom: none;
- }
- #right fieldset legend{
- paddg: 0px 20px;
- }
- #fen{
- width: 100%;
- -webkit-column-count: 3;
- -moz-column-count: 3;
- -o-column-count: 3;
- -ms-column-count: 3;
- column-count: 3;
- -webkit-column-gap: 1em;
- -moz-column-gap: 1em;
- -o-column-gap: 1em;
- -ms-column-gap: 1em;
- column-gap: 1em;
- }
- #fen img{
- width: 100%;
- border-radius: 10px 10px 10px 10px;
- }
- #fen p,h4{
- text-align: center;
- color: red;
- }
- #fen p{
- marg-bottom: -20px;
- }
- #di p{
- text-align: center;
- }
- #di p span{
- color: red;
- }
- }
- </style>
- </head>
- <body>
- <header>
- <img src="img/rag.png" />
- </header>
- <aside id="left">
- <img src="img/logo-bg.png" id="logo-bg"/>
- <img src="img/logo.png" id="logo" />
- <hr />
- <p>THE</p>
- <h4>WEBLOCUE</h4>
- <hr />
- <p>THE</p>
- <h4>WEBLOCUE</h4>
- <hr />
- <p>THE</p>
- <h4>WEBLOCUE</h4>
- <hr />
- </aside>
- <article id="right">
- <h2>“Give me problems, give me work.”</h2>
- <p>In the year 1878 I took dogree of Doctor of Medicle of the Unibertive of the London and problems to Netbody to go through the course,In the year 1878 I took dogree of Doctor of Medicle of the Unibertive of the London and problems to Netbody to go through the course,In the year 1878 I took dogree of Doctor of Medicle of the Unibertive of the London and problems to Netbody to go through the course.</p>
- <p>In the year 1878 I took dogree of Doctor of Medicle of the Unibertive of the London and problems to Netbody to go through the course,In the year 1878 I took dogree of Doctor of Medicle of the Unibertive of the London and problems to Netbody to go through the course,In the year 1878 I took dogree of Doctor of Medicle of the Unibertive of the London and problems to Netbody to go through the course.</p>
- <fieldset><legend>victors</legend></fieldset>
- <div id="fen">
- <img src="img/1.jpg" />
- <p>SETCOME</p>
- <h4>HOLEMES</h4>
- <img src="img/2.jpg" />
- <p>SETCOME</p>
- <h4>HOLEMES</h4>
- <img src="img/3.jpg" />
- <p>SETCOME</p>
- <h4>HOLEMES</h4>
- <img src="img/4.jpg" />
- <p>SETCOME</p>
- <h4>HOLEMES</h4>
- <img src="img/5.jpg" />
- <p>SETCOME</p>
- <h4>HOLEMES</h4>
- <img src="img/6.jpg" />
- <p>SETCOME</p>
- <h4>HOLEMES</h4>
- </div>
- <fieldset><legend></legend></fieldset>
- <div id="di">
- <p>In the year 1878 I took <span>Sug table</span> dogree of Doctor</p>
- <p>What the year 2016 I took dogree <span>Rug roid</span> of Doctor</p>
- </div>
- </article>
- </body>
- </html>
做的不够严谨,因为时间问题,请见谅。
以上这篇响应式布局的简单案例就是长沙网络推广分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持狼蚁SEO。
原文地址http://.blogs./duzheqiang/p/5666465.html
上一篇:全面了解行内元素与块级元素的区别
下一篇:CSS3实现iPhone滑动解锁功能代码
网站设计
- 静宁会SEO的网站建设公司:全面提升您的网络影
- 提升在线业务的关键:选择最佳的丽水网站建设
- 浙江网站优化发展潜力如何
- 井研专业的网站建设公司:打造您的在线品牌
- 灵山SEO网站建设公司:提升您的在线业务表现
- 蒙城网站建设优化公司:提升您网站表现的理想
- 阳谷企业网站优化:提升线上业务力的关键
- 樟树专业的网站建设公司:打造您在线业务的坚
- 通河百度SEO排名的策略与技巧
- 重庆百度快照排名如何进行精准的客户引流
- 重庆百度快照排名
- 常宁便宜的建站公司:助您轻松打造在线业务
- 巫溪百度网站优化:提升网站曝光率与流量的关
- 湖北整站优化怎么做才能放大客户需求
- 闸北网站建设多少钱?全面解析与预算规划
- 辽宁企业网站优化怎么做电话营销