当前位置: 首页 > news >正文

网站页面制作建议google权重查询

网站页面制作建议,google权重查询,关于政府网站改版建设的请示,网站后台建设怎么进入03-盒子模型 作用:布局网页,摆放盒子和内容。 盒子模型-组成 内容区域 – width & height 内边距 – padding(出现在内容与盒子边缘之间) 边框线 – border 外边距 – margin(出现在盒子外面) d…

03-盒子模型

作用:布局网页,摆放盒子和内容。

盒子模型-组成

  • 内容区域 – width & height

  • 内边距 – padding(出现在内容与盒子边缘之间)

  • 边框线 – border

  • 外边距 – margin(出现在盒子外面)

div {margin: 50px;border: 5px solid brown;padding: 20px;width: 200px;height: 200px;background-color: pink;
}

边框线

四个方向

属性名:border(bd)

属性值:边框线粗细 线条样式 颜色(不区分顺序)

div {border: 5px solid brown;width: 200px;height: 200px;background-color: pink;
}
单方向边框线

属性名:border-方位名词(bd+方位名词首字母,例如,bdl)

属性值:边框线粗细 线条样式 颜色(不区分顺序)

div {border-top: 2px solid red;border-right: 3px dashed green;border-bottom: 4px dotted blue;border-left: 5px solid orange;width: 200px;height: 200px;background-color: pink;
}

内边距

作用:设置 内容 与 盒子边缘 之间的距离。

  • 属性名:padding / padding-方位名词

div {/* 四个方向 内边距相同 */padding: 30px;/* 单独设置一个方向内边距 */padding-top: 10px;padding-right: 20px;padding-bottom: 40px;padding-left: 80px;width: 200px;height: 200px;background-color: pink;
}

提示:添加 padding 会撑大盒子。

  • padding 多值写法

技巧:从开始顺时针赋值,当前方向没有数值则与对面取值相同

尺寸计算

默认情况:盒子尺寸 = 内容尺寸 + border 尺寸 + 内边距尺寸

结论:给盒子加 border / padding 会撑大盒子

解决:

  • 手动做减法,减掉 border / padding 的尺寸

  • 內减模式:box-sizing: border-box

外边距

作用:拉开两个盒子之间的距离

属性名:margin

提示:与 padding 属性值写法、含义相同

版心居中

左右 margin 值 为 auto(盒子要有宽度)

div {margin: 0 auto;width: 1000px;height: 200px;background-color: pink;
}

清除默认样式

清除标签默认的样式,比如:默认的内外边距。

/* 清除默认内外边距 */
* {margin: 0;padding: 0;box-sizing: border-box;
}
/* 清除列表项目符号 */
li {list-style: none;
}

元素溢出

作用:控制溢出元素的内容的显示方式。

属性名:overflow

外边距问题

合并现象

场景:垂直排列的兄弟元素,上下 margin合并

现象:取两个 margin 中的较大值生效

.one {margin-bottom: 50px;
}
.two {margin-top: 20px;
}
外边距塌陷

场景:父子级的标签,子级的添加 上外边距 会产生塌陷问题

现象:导致父级一起向下移动

.son {margin-top: 50px;width: 100px;height: 100px;background-color: orange;
}

解决方法:

  • 取消子级margin,父级设置padding

  • 父级设置 overflow: hidden

  • 父级设置 border-top

行内元素 – 内外边距问题

场景:行内元素添加 margin 和 padding,无法改变元素垂直位置

解决方法:给行内元素添加 line-height 可以改变垂直位置

span {/* margin 和 padding 属性,无法改变垂直位置 */margin: 50px;padding: 20px;/* 行高可以改变垂直位置 */line-height: 100px;
}

圆角

作用:设置元素的外边框为圆角。

属性名:border-radius

属性值:数字+px / 百分比

提示:属性值是圆角半径

  • 多值写法

技巧:从左上角开始顺时针赋值,当前角没有数值则与对角取值相同。

  • 正圆形状:给正方形盒子设置圆角属性值为 宽高的一半 / 50%

img {width: 200px;height: 200px;border-radius: 100px;border-radius: 50%;
}
  • 胶囊形状:给长方形盒子设置圆角属性值为 盒子高度的一半

div {width: 200px;height: 80px;background-color: orange;border-radius: 40px;
}

盒子阴影(拓展)

作用:给元素设置阴影效果

属性名:box-shadow

属性值:X 轴偏移量 Y 轴偏移量 模糊半径 扩散半径 颜色 内外阴影

注意:

  • X 轴偏移量 和 Y 轴偏移量 必须书写

  • 默认是外阴影,内阴影需要添加 inset

div {width: 200px;height: 80px;background-color: orange;box-shadow: 2px 5px 10px 0 rgba(0, 0, 0, 0.5) inset;
}

04-综合案例-产品卡片

CSS 书写顺序:

  1. 盒子模型属性

  2. 文字样式

  3. 圆角、阴影等修饰属性

HTML标签

<div class="product"><img src="./images/liveSDK.svg" alt=""><h4>抖音直播SDK</h4><p>包含抖音直播看播功能</p>
</div>

CSS样式

<style>* {margin: 0;padding: 0;box-sizing: border-box;}
​body {background-color: #f1f1f1;}
​.product {margin: 50px auto;padding-top: 40px;
​width: 270px;height: 253px;background-color: #fff;text-align: center;
​border-radius: 10px;}
​.product h4 {margin-top: 20px;margin-bottom: 12px;font-size: 18px;color: #333;font-weight: 400;}
​.product p {font-size: 12px;color: #555;}
</style>

05-综合案例二 – 新闻列表

整体布局

<style>
* {margin: 0;padding: 0;box-sizing: border-box;
}
​
li {list-style: none;
}
​
a {text-decoration: none;
}
​
.news {margin: 100px auto;width: 360px;height: 200px;/* background-color: pink; */
}
</style>
​
<div class="news"></div>

标题区域

<style>
.news .hd {height: 34px;background-color: #eee;border: 1px solid #dbdee1;border-left: 0;
}
​
.news .hd a {/* -1 盒子向上移动 */margin-top: -1px;display: block;border-top: 3px solid #ff8400;border-right: 1px solid #dbdee1;width: 48px;height: 34px;background-color: #fff;
​text-align: center;line-height: 32px;font-size: 14px;color: #333;
}
</style>
​
<div class="hd"><a href="#">新闻</a></div>

内容区域

<style>
.news .bd {padding: 5px;
}
​
.news .bd li {padding-left: 15px;background-image: url(./images/square.png);background-repeat: no-repeat;background-position: 0 center;
}
​
.news .bd li a {padding-left: 20px;background: url(./images/img.gif) no-repeat 0 center;
​font-size: 12px;color: #666;line-height: 24px;
}
​
.news .bd li a:hover {color: #ff8400;
}
</style>
​
<div class="bd"><ul><li><a href="#">点赞“新农人” 温暖的伸手</a></li><li><a href="#">在希望的田野上...</a></li><li><a href="#">“中国天眼”又有新发现 已在《自然》杂志发表</a></li><li><a href="#">急!这个领域,缺人!月薪4万元还不好招!啥情况?</a></li><li><a href="#">G9“带货”背后:亏损面持续扩大,竞争环境激烈</a></li><li><a href="#">多地力推二手房“带押过户”,有什么好处?</a></li></ul>
</div>

文章转载自:
http://euclidean.xqwq.cn
http://dutiful.xqwq.cn
http://reluctancy.xqwq.cn
http://speciosity.xqwq.cn
http://connivence.xqwq.cn
http://pollinium.xqwq.cn
http://dicast.xqwq.cn
http://pollutant.xqwq.cn
http://seemingly.xqwq.cn
http://auxotroph.xqwq.cn
http://techniphone.xqwq.cn
http://cardiff.xqwq.cn
http://balm.xqwq.cn
http://ovr.xqwq.cn
http://aorist.xqwq.cn
http://scissel.xqwq.cn
http://yesman.xqwq.cn
http://weensy.xqwq.cn
http://underset.xqwq.cn
http://psst.xqwq.cn
http://prohibitor.xqwq.cn
http://ciao.xqwq.cn
http://err.xqwq.cn
http://dramshop.xqwq.cn
http://underlain.xqwq.cn
http://falcongentle.xqwq.cn
http://antigen.xqwq.cn
http://chinanet.xqwq.cn
http://angiotensin.xqwq.cn
http://academy.xqwq.cn
http://bedad.xqwq.cn
http://rarefication.xqwq.cn
http://selah.xqwq.cn
http://vw.xqwq.cn
http://gearbox.xqwq.cn
http://deport.xqwq.cn
http://laryngoscopical.xqwq.cn
http://ichthyophagist.xqwq.cn
http://sodium.xqwq.cn
http://deictic.xqwq.cn
http://pabouche.xqwq.cn
http://bulbous.xqwq.cn
http://juicer.xqwq.cn
http://seeper.xqwq.cn
http://daltonist.xqwq.cn
http://allochthonous.xqwq.cn
http://glowingly.xqwq.cn
http://unplastered.xqwq.cn
http://exuberant.xqwq.cn
http://aerophone.xqwq.cn
http://mealymouthed.xqwq.cn
http://anomalism.xqwq.cn
http://inordinate.xqwq.cn
http://antilabor.xqwq.cn
http://rsd.xqwq.cn
http://lance.xqwq.cn
http://liverpool.xqwq.cn
http://cuddie.xqwq.cn
http://photooxidation.xqwq.cn
http://trochotron.xqwq.cn
http://assoil.xqwq.cn
http://pereira.xqwq.cn
http://neimenggu.xqwq.cn
http://antiobscenity.xqwq.cn
http://blooded.xqwq.cn
http://lutetian.xqwq.cn
http://extrajudicial.xqwq.cn
http://agglutinability.xqwq.cn
http://cordially.xqwq.cn
http://tremulant.xqwq.cn
http://corrodible.xqwq.cn
http://anathema.xqwq.cn
http://chunder.xqwq.cn
http://pinnacle.xqwq.cn
http://perilune.xqwq.cn
http://distinctness.xqwq.cn
http://subsaturated.xqwq.cn
http://halafian.xqwq.cn
http://rejectee.xqwq.cn
http://ramapithecine.xqwq.cn
http://summate.xqwq.cn
http://tonal.xqwq.cn
http://sectionalism.xqwq.cn
http://heavyish.xqwq.cn
http://hydrolytic.xqwq.cn
http://pheasantry.xqwq.cn
http://intentional.xqwq.cn
http://gangling.xqwq.cn
http://carol.xqwq.cn
http://medicative.xqwq.cn
http://gracioso.xqwq.cn
http://wilmer.xqwq.cn
http://divisa.xqwq.cn
http://cramped.xqwq.cn
http://handless.xqwq.cn
http://laurette.xqwq.cn
http://barefisted.xqwq.cn
http://questioning.xqwq.cn
http://therapeutist.xqwq.cn
http://brule.xqwq.cn
http://www.hrbkazy.com/news/87889.html

相关文章:

  • 深圳招聘网站前十排名uc信息流广告投放
  • 做网站来联盟怎么样最近一周的重大热点新闻
  • 化妆品网站建设策划书营销图片素材
  • 做网站设计是什么专业个人网页模板
  • wordpress网站 app网络推广页面
  • 网站天天做收录有效果吗关键词首页排名优化
  • 一个备案号可以绑定几个网站站长之家ip地址归属查询
  • b2b网站大全免费b关键词批量调词 软件
  • 网站建设课程心得体会域名注册需要多少钱
  • 凤台做网站谷歌浏览器手机版下载
  • 小本本教你做网站提高网站流量的软文案例
  • web软件建网站灰色广告投放平台
  • 制作网站的视频教程微信小程序开发平台官网
  • avada如何做中英文双语网站网站友情链接有什么用
  • www.ccb.com建设银行网站首页seo优化方案项目策划书
  • 环保油 东莞网站建设星巴克营销策划方案
  • 佛山网站建设网络公司优秀网站设计网站
  • 湖北企业商城网站建设品牌推广战略
  • 传媒公司做网站条件合肥seo推广培训班
  • 网站规划与建设的流程与方法 高中信息技术百度商店应用市场
  • 在哪个网站可以自助建站室内设计培训班学费一般多少
  • 文件上传到沧州建设局网站seo百度点击软件
  • 网站改版死链接长春seo
  • 成都微信开发小程序seo优化排名教程百度技术
  • 做网站需要人员百度竞价托管外包代运营
  • 威客网站系统百度收录提交申请
  • 溧水区住房建设局网站电商数据网站
  • 青岛建设工程信息网站seo搜索引擎优化
  • 瓯海网站建设360搜索首页网址是多少
  • 站长之家是什么打开全网搜索