Width is not working

前端 未结 3 1198
攒了一身酷
攒了一身酷 2021-01-25 23:57

Sorry for this silly question, but i stick because of this problem, the width of the anchor tag is not working, basically i want to increase the height of the anchor tag so the

3条回答
  •  一向
    一向 (楼主)
    2021-01-26 00:35

    See the spec:

    'width'

    • Value: | | auto | inherit
    • Initial: auto
    • Applies to: all elements but non-replaced inline elements, table rows, and row groups
    • Inherited: no
    • Percentages: refer to width of containing block
    • Media: visual
    • Computed value: the percentage or 'auto' as specified or the absolute length

    a elements are, by default, non-replaced inline elements. So width property doesn't apply.

提交回复
热议问题