如上图所示,这个是使用appcan开发的移动app, 图中的li是使用Listview列表组件写的,代码如下:
<p id="listview"> </p>
var updateData = [{
title : "上海教育体系被赞世界最强之一教师是教育质 量的核心",
note : "2016-01-01",
icon : "img/icon_01.png"
}, {
title : "上海教育体系被赞世界最强之一教师是教育质 量的核心",
note : "2016-01-01",
icon : "img/icon_02.png"
}];
var lv1 = appcan.listview({
selector : "#listview",
type : "thickLine",
hasIcon : true,
hasAngle : false
});
lv1.set(updateData);
这个列表加了margin来设置li与li之间的间距,不起作用。
要达到如下图所示的效果,ul
的background-color
是灰色的,li
的background-color
是白色的,li
是有边框的, 上个li
的下边框与下个li
的上边框 之间是有空隙的。
请问,如何用css
设置这种 li
与li
边框 之间的空隙?
PHP中文网2017-04-17 14:43:22
I found the cause of the problem. It’s not that margin doesn’t work, but that background-color:#fff
is written incorrectly, and ul
also has a white background
-_-||| @_@
Thank you all for your responses. . .
ps: It took a long time to make trouble but it was an own mistake. . . I really want to find a crack in the ground and crawl into it. . . Cover your face. . . .
大家讲道理2017-04-17 14:43:22
Margin is the outer margin. Isn’t this enough?
This is no problem either
Looked at the one downstairs. I’ll post another padding for you
PHPz2017-04-17 14:43:22
Just set margin. But you haven’t adopted the above answer. Is it because you don’t understand your needs and how to get it?