fancy111
V2EX  ›  问与答

CSS, DIV 空隙问题

  •  
  •   fancy111 · Oct 30, 2019 · 1540 views
    This topic created in 2414 days ago, the information mentioned may be changed or developed.

    <html> <head>

    <meta content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0" name="viewport">
    <meta charset="utf-8">
    <title></title>
    <style type="text/css"> *{ margin:0;padding: 0; } .a1{ width: 100%; height: 300px;background: green;background-size: 100% 100%;margin: 0; } .a2{ width: 100%; height: 300px;background: green;background-size: 100% 100%;margin: 0; } .a3{ width: 100%; height: 300px;background: green;background-size: 100% 100%;margin: 0; } body{ margin:0;padding: 0; } </style> <\/head> <\body>
    <\div class="a1">fdssda<\/div>
    <\div class="a2">fdsasadfsad<\/div>
    <\div class="a3">fdasdfasdf<\/div>
    <\/body> <\/html>

    V2 贴代码好麻烦啊。手机端显示三个 DIV 中间会有白色缝隙。什么原因?

    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   902 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 29ms · UTC 20:55 · PVG 04:55 · LAX 13:55 · JFK 16:55
    ♥ Do have faith in what you're doing.