首页  >  文章  >  web前端  >  horizonal scroll bar,vertical top align ,display conten in one line css for table or div_html/css_WEB-ITnose

horizonal scroll bar,vertical top align ,display conten in one line css for table or div_html/css_WEB-ITnose

WBOY
WBOY原创
2016-06-24 12:28:411297浏览

今天边学边做了些css的tasks.下面几点今后会用到。

.box
{
 overflow:auto;     // 1。

.....
当table内容过高或过长时自动产生scroll bar
}
.tbcontent{
font-family: Arial, Tahoma, Verdana, Calibri;
border:solid #ababab;
-moz-border-radius: 5px;
border-bottom-width: 2px;
border-top-width: 25px;
width: 100%;
text-align:left;
}
#customers
  {
  font-family:"Trebuchet MS", Arial, Helvetica, sans-serif;
  width:100%;
  border-collapse:collapse;
  border:solid #999999;
  border-bottom-width: 2px;
  border-top-width: 25px;
 -moz-border-radius: 5px;
  }

#customers td, #customers th
  {
  font-size:1em;
  padding:3px 7px 2px 7px;
  height:20px;
  text-align:center;
  white-space:nowrap;// 2。...................
Column Header 1Column Header N
当列数过多的时候 Column Header k 会显示成多行,
  }

#customers th
  {
  font-size:1.1em;
  text-align:center;
  padding-top:5px;
  padding-bottom:4px;
  background-color:#bcbcbc;
  color:#ffffff;
  }

#customers tr.alt td    // 3。 实现斑马线
  {
  color:#000000;
  background-color:#dedede;
  text-align:center;
  }
.title
{
position:relative;
top:20px;
left:10px;
color:#ffffff;
font-weight: bold;}

// 4.能实现两个div 上对齐

声明:
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn