您现在的位置是:网站首页> 编程资料编程资料
响应式布局的简单案例响应式设计你需要了解的知识点响应式布局总结(推荐)css3media响应式布局实例浅谈响应式设计
2023-10-21
325人已围观
简介 下面小编就为大家带来一篇响应式布局的简单案例。小编觉得挺不错的,现在就分享给大家,也给大家做个参考。一起跟随小编过来看看吧,祝大家游戏愉快哦
响应式布局
响应式布局在面对不同分辨率设备灵活性强,在平时的网页设计中基本上都要用到响应式布局设计,它给我们提供了良好的用户浏览页面,能带给我们更好的客户体验,下面给大家分享下我做的一个简单的响应式的布局:


不同的页面会适用不同大小浏览器页面,它会随着分辨率的变化而变化。代码展示如下:
XML/HTML Code复制内容到剪贴板
- >
- <html>
- <head>
- <meta charset="utf-8" />
- <title>title>
- <style>
- p{
- font-size: 12px;
- }
- header{
- width: 100%;
- }
- header img{
- width: 100%;
- }
- @media (min-width: 1300px) and (max-width:1400px) {
- #left{
- float: left;
- width: 30%;
- margin: 0px 50px;
- }
- #left #logo-bg{
- margin: 10% 10%;
- width: 80%;
- position: relative;
- }
- #left #logo{
- float: left;
- width: 12%;
- position: absolute;
- left: 13%;
- top: 230px;
- }
- #left p{
- margin-bottom: -20px;
- }
- #left p,h4{
- text-align: center;
- color: red;
- }
- #right{
- float: left;
- width: 60%;
- margin: 15% 0px;
- }
- #right h2{
- text-align: center;
- }
- #right fieldset{
- text-align: center;
- border-left: none;
- border-right: none;
- border-bottom: none;
- }
- #right fieldset legend{
- padding: 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{
- margin-bottom: -20px;
- }
- #di p{
- text-align: center;
- }
- #di p span{
- color: red;
- }
- }
- @media (min-width: 1000px) and (max-width:1300px){
- #left{
- float: left;
- width: 30%;
- margin: 0px 50px;
- }
- #left #logo-bg{
- margin: 10% 10%;
- width: 80%;
- position: relative;
- }
- #left #logo{
- width: 12%;
- position: absolute;
- left: 14%;
- top: 190px;
- }
- #left p{
- margin-bottom: -20px;
- }
- #left p,h4{
- text-align: center;
- color: red;
- }
- #right{
- float: left;
- width: 60%;
- margin: 15% 0px;
- }
- #right h2{
- text-align: center;
- }
- #right fieldset{
- text-align: center;
- border-left: none;
- border-right: none;
- border-bottom: none;
- }
- #right fi
相关内容
- 全面了解行内元素与块级元素的区别对行内元素和块级元素的一些认识浅谈CSS块级元素与行内元素(内联元素)的区别和联系 进一步理解CSS编程中的块级元素和行内元素CSS行内元素和块级元素的居中实例分析
- CSS3绘制有活力的链接下划线CSS3制作hover下划线动画CSS3简单带下划线跟随下拉菜单特效源码CSS中的下划线text-decoration属性使用进阶CSS3实现下划线跟随动画且背景色渐变菜单源码div css布局命名时尽量避免下划线使用CSS去掉网页中超链接的下划线示例不可思议的CSS导航栏下划线跟随效果
- 天天富翁人物战斗力一览表_手机游戏_游戏攻略_
- 天天富翁签到奖励大全_手机游戏_游戏攻略_
- 全民英雄初级紫装怎么合成_手机游戏_游戏攻略_
- 天天酷跑胜场的星星集满有什么作用_手机游戏_游戏攻略_
- 天天酷跑胜场的太阳的作用是什么_手机游戏_游戏攻略_
- 天天飞车 加速度有什么用 加速度减少损失_手机游戏_游戏攻略_
- 天天富翁 乌咪怎么获得 乌咪拼图获得攻略_手机游戏_游戏攻略_
- 全民斗三国 变异技能详解_手机游戏_游戏攻略_
点击排行
本栏推荐
