[CSS样式表]表格强制不换行
[CSS样式表]表格强制不换行
table{
width:30em;
table-layout:fixed;/* 只有定义了表格的布局算法为fixed,下面td的定义才能起作用。 */
}
td{
width:100%;
word-break:keep-all;/* 不换行 */
white-space:nowrap;/* 不换行 */
overflow:hidden;/* 内容超出宽度时隐藏超出部分的内容 */
text-overflow:ellipsis;/* 当对象内文本溢出时显示省略标记(...) ;需与overflow:hidden;一起使用。*/
}
=================================
注:这个东东只对单行的文字的效,如果你想把它用在多行上,也只有第一行有作用的。 这个写法只有IE会有“...”,其它的浏览器文本超出指定宽度时会隐藏。
相关问答:
不懂他网格如何原理
\Using Nesting Grids
YUI Grids CSS provides a system for subdividing sections of your page with nestable grids. Use this technique to easily create complex layouts that go ......
setSampleList : function(dataList){
var newslist = document.getElementById("newslist");
var basePath = document.getElementById("basePath").value; ......
CSS code:
body {
}
#x
{
width:1024px;
height:768%;
background-color:Red;
position:relative;
}
#x.top
{ position:absolute;
width:800px;
height:100px;
top:0px ......
问题在代码中!
JScript code:
<div style="width:800px;height:200px;border:1px #dcdcdc solid">
父div为div3
<div style="width:200px;height:200px;backg ......
用CSS能控制struts标签控件和控件里的文字的大小吗?
请懂的朋友指教一下!
谢谢!
试一下吧!
CSS code:
<style type="text/css">
body{
font-size:30px;
}
</style>
我 ......