css li 换行
functionschool()school=""setrs=rsfun("select*fromschoolorderbyiddesc",1)ifrs.eofthene...
function school()
school=""
set rs=rsfun("select * from school order by id desc",1)
if rs.eof then
else
dim k
k=1
school=school&"<ul class='sintro'>"
do while not rs.eof
school=school&"<li><a href='readnews.asp?cid=2&pid="&rs("sid")&"'><img src='"&rs("logo")&"' title='"&rs("names")&"详细介绍' width='150' height='50'></a><a href='readnews.asp?cid=2&pid="&rs("sid")&"'>"&rs("names")&"</a></li>"
if k mod 3=0 then
school=school&"</ul><ul class='sintro'>"
end if
k=k+1
rs.movenext
loop
school=school&"</ul>"
end if
rs.close
set rs=nothing
end function
要实现 读取的文字和图片如下格式: 展开
school=""
set rs=rsfun("select * from school order by id desc",1)
if rs.eof then
else
dim k
k=1
school=school&"<ul class='sintro'>"
do while not rs.eof
school=school&"<li><a href='readnews.asp?cid=2&pid="&rs("sid")&"'><img src='"&rs("logo")&"' title='"&rs("names")&"详细介绍' width='150' height='50'></a><a href='readnews.asp?cid=2&pid="&rs("sid")&"'>"&rs("names")&"</a></li>"
if k mod 3=0 then
school=school&"</ul><ul class='sintro'>"
end if
k=k+1
rs.movenext
loop
school=school&"</ul>"
end if
rs.close
set rs=nothing
end function
要实现 读取的文字和图片如下格式: 展开
展开全部
li里面再加几个容器
li {width:33%; float:left;}
dl {width:100%;text-axxx:center;}忘记居中怎么写了
dt {height:?px;}根据图片的高度,最好规定容器大小
dd {height:30px; line-height:30px;}
school=school&"<li><dl><dt><a href='readnews.asp?cid=2&pid="&rs("sid")&"'><img src='"&rs("logo")&"' title='"&rs("names")&"详细介绍' width='150' height='50'></a><dt><dd><a href='readnews.asp?cid=2&pid="&rs("sid")&"'>"&rs("names")&"</a></dd><dd></dd>学校网站 中文网站 查看课程</li>"
li {width:33%; float:left;}
dl {width:100%;text-axxx:center;}忘记居中怎么写了
dt {height:?px;}根据图片的高度,最好规定容器大小
dd {height:30px; line-height:30px;}
school=school&"<li><dl><dt><a href='readnews.asp?cid=2&pid="&rs("sid")&"'><img src='"&rs("logo")&"' title='"&rs("names")&"详细介绍' width='150' height='50'></a><dt><dd><a href='readnews.asp?cid=2&pid="&rs("sid")&"'>"&rs("names")&"</a></dd><dd></dd>学校网站 中文网站 查看课程</li>"
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询