字符串截取问题 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.
相关文档:
想修改一下子自己的CSS,因为博客标题正好把网页图片上的文字正好档了一部分,看起来很不爽。最后确实是由“margin命令”来控制的,于是上网学习了一下子这个的用法。margin在中文中我们翻译成外边距或者外补白(本文中引用外边距)。他是元素盒模型(box model)的基础属性。
一、margin的基本特性
margin属 ......
/***************************by
garcon1986********************************/
感谢CSDN的shan1119 帮我解决Javascript部分的错误。
<mce:script language="JavaScript"><!--
function toggle(id,id2,id3) {
var state = document.getElementById(id).style.display;
if (state == 'block') {
......
/***************************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 ......
例子:<span style="cursor:*">文本或其它页面元素</span> <a href="#" style="cursor:*">文本或其它页面元素</a> 注意把 * 换成如下15个效果的一种:
下面是对这15种效果的解释。移动鼠标到解释上面,看看你的鼠标起了什么变化吧!
hand是手型
例子:CSS鼠标手型效果 <a ......
1.css在不同浏览器下显示效果不同
firefox和IE对某些css样式的认定有不少区别,包括:
· ul和ol的默认padding值是不一样的,在Firefox中, ......