字符串截取问题 css截取字符串注意事项
<div class="llist" >
<div class="lbar">定向营销</div>
<ul class="lbox01" style="height: auto;min-height: 100px;">
<c:forEach var="item" items="${marketInfos.results}">
<li><div style="overflow:hidden; text-overflow:ellipsis; white-space:nowrap;max-width: 220px;font-size:13px;" mce_style="overflow:hidden; text-overflow:ellipsis; white-space:nowrap;max-width: 220px;font-size:13px;">
<a href="#" mce_href="#" title="<c:out value="${item.content}" escapeXml="false"></a>" onclick="showThis('<c:out value="${item.title}"/>','<fmt:formatDate value="${item.createdTime}" pattern="yyyy-MM-dd hh:mm"/>',this);return false;">
<c:out value="${item.title}"/></a></div></li>
</c:forEach>
这是原来的代码。
说一下用
style="overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
这种方法要注意的问题,
1.最好加div,直接放在<li>那会出问题。放在<A>里也一样。不过IE7和FF好像行。
2.ie6在此种方式下不支持max-width.
相关文档:
J2me中css解析
最近做手机浏览器项目中的CSS模块。对解析css有了个整体认识。现总结如下:
首先,简单的介绍下CSS :
CSS 指层叠样式表 (Cascading Style Sheets)
CSS 语法由三部分构成:选择器、属性和值:selector {property: value}
选择器 (selector) 通常是你希望定义的 ......
/***************************by
garcon1986********************************/
区分
visibility:hidden
和
display:none
visibility:hidden
hides an element, but it will still take up the same space as before.
The element will be hidden, but still affect the layout.
Display: none
hides ......
body{
background-image:url(about:blank);
background-attachment:fixed;
}
.myDiv{
position:fixed !important;
position:absolute;
top:expression(eval(document.documentElement.scrollTop));
}
body元素中background-image:url(about:blank);background-attachment:fixed;可防止ie6中出现闪 ......
竞争规则:css允许多次将同一个规则赋予某个元素。层叠排序根据规则中使用的选择符将规则划分6组,高优先级组里的规则会覆盖低优先级组里的规则。普通的选择符会设置文档的总体样式,更具体的选择符会覆盖普通选择符,以为其提供更加特殊的样式
6个选择符群组:
1. 使用!important规 ......