chimingphang
V2EX  ›  问与答

背景层和顶部标签怎么定位的问题

  •  
  •   chimingphang · Dec 5, 2016 · 2327 views
    This topic created in 3638 days ago, the information mentioned may be changed or developed.

    text 如图,如果我背景图片是 background-size:cover; 那我顶部标签该怎么定位啊? 百分比好像还是有问题,好难,哪位大神有经验解解?

    2 replies  •  2016-12-05 17:17:44 +08:00
    SilentDepth
    SilentDepth
    Dec 5, 2016❤️1
    1
    如果图片或容器的宽高比是无法确定的, JS 吧,确定一个长边后按百分比定位
    chimingphang
    chimingphang
    OP
    Dec 5, 2016
    2
    @SilentDepth 太感谢你了
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   1915 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 12:18 · PVG 20:18 · LAX 04:18 · JFK 07:18
    ♥ Do have faith in what you're doing.