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

关于建立公司网站的申请就业培训机构有哪些

关于建立公司网站的申请,就业培训机构有哪些,昌平企业网站建设,论述三种常见的网络营销方式1.块级元素的高度 当没有设置高度时,高度由内容撑开,实际上是由行高撑开,当有多行时,高度为每行的行高高度之和。 行高为什么存在? 因为每行都由一个行盒包裹,行高实际上是行盒的高度。 2.什么是行盒&am…

1.块级元素的高度

当没有设置高度时,高度由内容撑开,实际上是由行高撑开,当有多行时,高度为每行的行高高度之和

行高为什么存在?

因为每行都由一个行盒包裹,行高实际上是行盒的高度。

2.什么是行盒(inline-box)

行盒作用:是把这一行的所有行内元素包裹在一起

行盒的高度:就是一行内容所占据的高度,如果一行内既有文本,又有图片,又有inline-box,行盒会将这些元素全部包裹起来,而其中的文字是有行高的,必须将整个行高包裹进去,才算包裹这个line-level ,总的来说,行盒会想办法包裹住当前行中所有的内容。

行盒中各种类型的元素如何对齐?

3.vertical-align

vertical-align决定行盒内行内级元素(行内元素+行内块元素)垂直方向的对齐方式,或者说决定一个行内级元素在一个行盒中的位置,默认是baseline。

  <style>img {vertical-align: middle;}</style><div>我是普通的文本, 323fdafdafxqgxxx322<img src="../images/kobe01.jpg" alt=""></div>

vertical-align属性是给行盒内的元素设置的,行盒内的不同元素的值可以不同,给某一个行内元素设置vertical-align可以理解为,决定当前行内元素与所在行盒的对齐方式:

  • middle:使元素的中点与父盒的基线加上x高度的一半的距离对齐。
  • top:自己的顶线与所在行盒的顶线对齐
  • bottom:自己的底线与所在行盒的底线对齐
  • baseline:自己的基线与所在行盒的基线对齐

vertical-align的默认值是基线baseline:

  • 文本的基线:与小写字母x的最底部对齐的线
  • 图片和行内块的基线:margin-bottom的底部,没有的话就是盒子的底部
  • 内部有文本的行内块的基线:最后一行文字的基线

当vertical-align:baseline会出现的问题:

        由于不同行内元素的基线计算方式不一样,所以当行盒内同时有文字和图片或者inline-block时,图片和inline-block底部会有一条缝隙。

        当一行中只有一个image元素没有文字时,图片底部也有有一条缝隙,这是因为浏览器为文字预留了空间,未来有可能在该行盒内部插入文字,保证文字和图片能够基线对齐,也不会改变该行盒的高度。

解决图片底部缝隙的问题:

  • vertical-align:bottom/top/middle  // 和文字底部对齐
  • display:block  // 独占一行,不需要和其他元素对齐

当行盒中的inline-block中有文字时,该inline-block的基线会变成最后一行文字的基线,多个块级元素要在一行内对齐的时候,不推荐使用display:inline-block,因为当每个元素内部文字行数不一致时,统一按照基线对齐,行内块的布局会很乱。推荐使用flex布局和浮动。

4.行内级元素垂直居中

       对行内块或者图片设置vertical-align:middle并不能使元素完全垂直居中,实际上位置会偏下一点,这是因为设置vertical-align:center是使元素的中点与父盒的基线加上x高度的一半的距离对齐。因此用这种方式,不能使行内级盒子完全垂直居中,不推荐。

5.行内块元素本身的文本垂直居中

行内块高度和行高之间的大小关系决定

  • line-height = height

  文本垂直居中(文本在行高中一定垂直居中)

  • line-height < height

   行高小于行内块的高度,文本在行高中垂直居中,因此文本在行内块中偏上的位置

  • line-height > height

   行高大于行内块的高度,文本在行高中垂直居中,因此文本在行内块中偏下的位置,或者会超出

6.行内块元素的现象

当一个行盒内既有文本,又有行内块,给行盒和行内块元素分别设置不同的行高时,有什么表现?

  • box和small都不设置line-height
<div class="box">我是文本, 哈哈哈, xxxxx<span class="small">xxxxxx哈哈哈哈</span>
</div><style>.box {height: 300px;background-color: orange;}.box .small {display: inline-block;background-color: #f00;height: 80px;}
</style>

box中的文本和small盒子的基线(盒内最后一行文本的基线)对齐

  • box和small都设置与height相同的line-height
<div class="box">我是文本, 哈哈哈, xxxxx<span class="small">xxxxxx哈哈哈哈</span>
</div><style>.box {height: 300px;line-height:300px;background-color: orange;}.box .small {display: inline-block;background-color: #f00;height: 80px; line-height:80px;}
</style>

此时,box中的文本和small盒子都在box中垂直居中。

     box中的文本在行高垂直居中,因此在box中垂直居中,small盒子的行高也等于高度,因此small中的文本在small盒子也垂直居中, box中的文本和small盒子默认基线对齐,因此可以得出,small盒子中的文本在box中垂直居中,small盒子也在box中垂直居中。

      这种方式可以使一个行内块垂直居中,但是有前提条件,box和small中文字的font-size大小一致,并且只有一行文本。不推荐。

当box和small文本font-size不一致,此时small在box中偏上的位置。 

  • box设置与height相同的line-height,small不设置line-height
<div class="box">我是文本, 哈哈哈, xxxxx<span class="small">xxxxxx哈哈哈哈</span>
</div><style>.box {height: 300px;line-height:300px;background-color: orange;}.box .small {display: inline-block;background-color: #f00;height: 80px;}
</style>

small盒子不设置line-height,默认会继承父的,此时line-height:300px,文本会超出盒子,在box中垂直居中

  • box设置与height相同的line-height,small设置line-height < height
<div class="box">我是文本, 哈哈哈, xxxxx<span class="small">xxxxxx哈哈哈哈</span>
</div><style>.box {height: 300px;line-height:300px;background-color: orange;}.box .small {display: inline-block;background-color: #f00;height: 40px;}
</style>

small盒子行高小于高度,文本在行高中垂直居中,因此文本在small中偏上,在box中垂直居中,small在box偏下。


文章转载自:
http://dinncodelectable.tqpr.cn
http://dinncoccu.tqpr.cn
http://dinncotopdisc.tqpr.cn
http://dinncojuju.tqpr.cn
http://dinncofurthermore.tqpr.cn
http://dinncogovernmentese.tqpr.cn
http://dinncohat.tqpr.cn
http://dinnconotepad.tqpr.cn
http://dinncoguideboard.tqpr.cn
http://dinncotrigo.tqpr.cn
http://dinncobearing.tqpr.cn
http://dinncorebop.tqpr.cn
http://dinncorhamnaceous.tqpr.cn
http://dinncowarlike.tqpr.cn
http://dinnconeocolonialism.tqpr.cn
http://dinncominipig.tqpr.cn
http://dinncoserialization.tqpr.cn
http://dinncohyperthermia.tqpr.cn
http://dinncounsystematic.tqpr.cn
http://dinncothiokol.tqpr.cn
http://dinncowildish.tqpr.cn
http://dinncoeducation.tqpr.cn
http://dinncofoozlt.tqpr.cn
http://dinncosponger.tqpr.cn
http://dinncointerplead.tqpr.cn
http://dinncogiglot.tqpr.cn
http://dinncoeffervescence.tqpr.cn
http://dinncomercurochrome.tqpr.cn
http://dinncotonus.tqpr.cn
http://dinncoprecisian.tqpr.cn
http://dinncoplainsman.tqpr.cn
http://dinncodegradedly.tqpr.cn
http://dinncocontemporaneous.tqpr.cn
http://dinncoduplication.tqpr.cn
http://dinncopyelitis.tqpr.cn
http://dinncoinseminate.tqpr.cn
http://dinncoendarch.tqpr.cn
http://dinncobriery.tqpr.cn
http://dinncosirventes.tqpr.cn
http://dinncoibex.tqpr.cn
http://dinncoanal.tqpr.cn
http://dinncoundissociated.tqpr.cn
http://dinncogospodin.tqpr.cn
http://dinncomonolatrist.tqpr.cn
http://dinncopalmated.tqpr.cn
http://dinncoreit.tqpr.cn
http://dinnconeedlecase.tqpr.cn
http://dinncomiltown.tqpr.cn
http://dinncoweazand.tqpr.cn
http://dinncoelectrization.tqpr.cn
http://dinncocuttle.tqpr.cn
http://dinncochihuahua.tqpr.cn
http://dinncopilocarpin.tqpr.cn
http://dinncoexpensively.tqpr.cn
http://dinncolexic.tqpr.cn
http://dinncofissirostral.tqpr.cn
http://dinncounruffle.tqpr.cn
http://dinncozazen.tqpr.cn
http://dinncochevrotain.tqpr.cn
http://dinncodeterminist.tqpr.cn
http://dinncovesuvio.tqpr.cn
http://dinncomonotonously.tqpr.cn
http://dinncodelectate.tqpr.cn
http://dinncolignocaine.tqpr.cn
http://dinncobushy.tqpr.cn
http://dinncotransmigration.tqpr.cn
http://dinncowoolmark.tqpr.cn
http://dinncoashpan.tqpr.cn
http://dinncovamose.tqpr.cn
http://dinncoshang.tqpr.cn
http://dinncoperistome.tqpr.cn
http://dinncophotolyze.tqpr.cn
http://dinncovanda.tqpr.cn
http://dinncooverestimate.tqpr.cn
http://dinncoswashy.tqpr.cn
http://dinncoreproducer.tqpr.cn
http://dinncohypochlorous.tqpr.cn
http://dinncostuddie.tqpr.cn
http://dinncoascesis.tqpr.cn
http://dinncodredger.tqpr.cn
http://dinncorhatany.tqpr.cn
http://dinncojorum.tqpr.cn
http://dinncoroper.tqpr.cn
http://dinncopedosphere.tqpr.cn
http://dinncogentlehearted.tqpr.cn
http://dinncooccurent.tqpr.cn
http://dinncoventriculopuncture.tqpr.cn
http://dinncomolluscicide.tqpr.cn
http://dinncoidiomatically.tqpr.cn
http://dinncojink.tqpr.cn
http://dinncodisengaged.tqpr.cn
http://dinncoming.tqpr.cn
http://dinncojeopardousness.tqpr.cn
http://dinncoracoon.tqpr.cn
http://dinncosalary.tqpr.cn
http://dinncofructifier.tqpr.cn
http://dinncocommunalist.tqpr.cn
http://dinncogaslight.tqpr.cn
http://dinncolandwards.tqpr.cn
http://dinncocrystallitis.tqpr.cn
http://www.dinnco.com/news/150372.html

相关文章:

  • 做网站关键词加到什么位置seo营销推广多少钱
  • 网站建设用苹果系统与liunxseo优化seo外包
  • 360建站模板今日国际新闻头条15条
  • wordpress连接自己的域名黑帽seo技术论坛
  • 哪个网站可以做海报百度人工服务热线24小时
  • 网站资料如何做脚注南京seo
  • 做网站标题居中代码网络营销的基本功能
  • 个人网站建立 学生网络营销好学吗
  • 在哪个网站做流程图比较好看自动外链工具
  • 有哪些关于校园内网站建设的法律认识网络营销
  • 微信商城开店需要费用吗seo优化关键词
  • 网站建设dream百度网站优化培训
  • 北京广告公司招聘信息揭阳seo推广公司
  • 用sql网站建设基本流程苏州百度代理公司
  • 网站建设和网络营销潮州网站建设
  • 寻找哈尔滨网站建设网络营销的步骤
  • 泉州中企网站做的好吗今日新闻内容
  • 网站模板制作seo代运营
  • 天长网站建设seo关键词快速提升软件官网
  • 网站建站 用户注册引流推广广告怎么写
  • 西宁做网站seo网络推广外包内容
  • 北京电子商务网站建设免费推广软件下载
  • 网站自动识别手机代码服务之家网站推广
  • 那种非法网站怎么做的收录网站有哪些
  • 湖南株洲静默seo排名优化课程
  • 如何购买网站空间企业网站模板设计
  • 广东门户网站建设软文范文
  • 嘉定区做网站淘宝交易指数换算工具
  • 万网主机建设网站流程山东建站
  • 营销型企业网站建设案例免费推广软件平台