asp语句生成的符号列表如何设置行间距?
我修改了CSS中相关设置仍然无济于事,相关语句如下所示:If(idcount>0Andsqlid<>"")Thensql="selecttop8*from["&dataf...
我修改了CSS中相关设置仍然无济于事,相关语句如下所示:
If(idcount>0 And sqlid<>"") Then
sql = "select top 8 * from ["& datafrom &"] where id in("& sqlid &") "&taxis
Set rs = server.CreateObject("adodb.recordset")
rs.Open sql, conn, 0, 1
Response.Write "<ul class=""nll"" >"
While Not rs.EOF
AutoLink = "NewsView.Asp?ID="&rs("ID")&""&vbCrLf
Response.Write "<li><span class=""addTime"">"&FormatDate(rs("Addtime"), 13)&"</span><span class=""className""><a href="""&AutoLink&""" >"&rs("NewsName")&"</a></span></li>"
Response.Write "<li class=""newsLine""></li>"
rs.movenext
Wend
Response.Write "</ul>"&vbCrLf
Else
response.Write "<center>暂无相关信息</center>"
Exit Function
End If
CSS相关设置如下:
ul.nll {
list-style:none outside none;
}
ul.nll li {
line-height:12px;
padding-left:15px;
background:url(li.gif) no-repeat 0px 50%;
clear:both;
overflow:hidden;
text-align:left;
vertical-align: middle;
}
ul.nll li.newsLine {
overflow:hidden;
height:5px;
line-height:5px;
background-image: url(dotLine.gif);
background-repeat: repeat-x;
background-position: top;
}
ul.nll li .addTime {
float:right;
color:#666666
}
我正为部门作网页,急求支援!谢谢啦! 展开
If(idcount>0 And sqlid<>"") Then
sql = "select top 8 * from ["& datafrom &"] where id in("& sqlid &") "&taxis
Set rs = server.CreateObject("adodb.recordset")
rs.Open sql, conn, 0, 1
Response.Write "<ul class=""nll"" >"
While Not rs.EOF
AutoLink = "NewsView.Asp?ID="&rs("ID")&""&vbCrLf
Response.Write "<li><span class=""addTime"">"&FormatDate(rs("Addtime"), 13)&"</span><span class=""className""><a href="""&AutoLink&""" >"&rs("NewsName")&"</a></span></li>"
Response.Write "<li class=""newsLine""></li>"
rs.movenext
Wend
Response.Write "</ul>"&vbCrLf
Else
response.Write "<center>暂无相关信息</center>"
Exit Function
End If
CSS相关设置如下:
ul.nll {
list-style:none outside none;
}
ul.nll li {
line-height:12px;
padding-left:15px;
background:url(li.gif) no-repeat 0px 50%;
clear:both;
overflow:hidden;
text-align:left;
vertical-align: middle;
}
ul.nll li.newsLine {
overflow:hidden;
height:5px;
line-height:5px;
background-image: url(dotLine.gif);
background-repeat: repeat-x;
background-position: top;
}
ul.nll li .addTime {
float:right;
color:#666666
}
我正为部门作网页,急求支援!谢谢啦! 展开
2个回答
展开全部
我来说下:
如果在li下写line-height:是针对于此li的行距。如果实现不了,可以用
margin-bottom:5px来实现li与li间的外距。你自己测试下。
欢迎到我BLOG玩玩 www.ryeen.com
如果在li下写line-height:是针对于此li的行距。如果实现不了,可以用
margin-bottom:5px来实现li与li间的外距。你自己测试下。
欢迎到我BLOG玩玩 www.ryeen.com
参考资料: www.ryeen.com
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询