CSS, DIV 空隙问题

2019-10-30 16:54:56 +08:00
 fancy111

<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 中间会有白色缝隙。什么原因?

1131 次点击
所在节点    问与答
0 条回复

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/614541

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX