How to scale a div without scaling content

前端 未结 3 2009
谎友^
谎友^ 2020-12-20 23:39

I have this div (id=\"myDiv\"), when the div is under css - scale all it\'s children are under scale as well. I need the div to enlarge but not the children, in a \"creative

3条回答
  •  难免孤独
    2020-12-21 00:28

    Your math is just off, as Paulie_D said, also, if you don't want spacing issues, I'd wrap the contents of the div in another div and control that div's margin-top, e.g.

    Song

    Strawberry fields forever

    Here's a fiddle

提交回复
热议问题