Why does CSS not support negative padding?

前端 未结 7 1443
予麋鹿
予麋鹿 2020-11-30 01:26

I have seen this many a times that the prospect of a negative padding might help the development of CSS of certain page elements become better and easier. Yet, there is no p

7条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-11-30 01:52

    Fitting an Iframe inside containers will not match the size of the container. It adds about 20px of padding. Currently there is no easy way to fix this. You need javascript (http://css-tricks.com/snippets/jquery/fit-iframe-to-content/)

    Negative margins would be an easy solution.

提交回复
热议问题