你必须穷尽一生磨练技能,这就是成功的秘诀,也是让人家敬重的关键。

a标签里浮动或者定位的子元素不会继承’text-decoration’

表现 练习 1672浏览 0评论

踩坑笔记

This property describes decorations that are added to the text of an element using the element’s color. When specified on or propagated to an inline element, it affects all the boxes generated by that element, and is further propagated to any in-flow block-level boxes that split the inline (see section 9.2.1.1). But, in CSS 2.1, it is undefined whether the decoration propagates into block-level tables. For block containers that establish an inline formatting context, the decorations are propagated to an anonymous inline element that wraps all the in-flow inline-level children of the block container. For all other elements it is propagated to any in-flow children. Note that text decorations are not propagated to floating and absolutely positioned descendants, nor to the contents of atomic inline-level descendants such as inline blocks and inline tables.

官方文档: http://www.w3.org/TR/CSS21/text.html#lining-striking-props

demo:

提示:你可以先修改部分代码再运行。

转载请注明:练小习的前端技术笔记 » a标签里浮动或者定位的子元素不会继承’text-decoration’

发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址