*{margin: 0px;} // 去缝隙
header_t_l{... float:left;} // 对齐方式
header_t_r{... float:left;} // 用display:inline?
header_b{... float:left;} // (?)<div>是block级别的
@reference_1
The Old Way - using {float: left;}{clear: left;}
The New Way - using {display: inline-block;}
Showing posts with label css. Show all posts
Showing posts with label css. Show all posts
Saturday, November 26, 2016
Thursday, November 24, 2016
:nth-child & :nth-of-type
.first span:nth-child(2n+1),
<table>
... table content ...
</table>
</div>
position: fixed;
position: absolute;
.second span:nth-child(2n+1),
.third span:nth-of-type(2n+1) {
background-color: lime;
}
--------------------
Responsive Table
A responsive table will display a horizontal scroll bar if the screen is too small to display the full content.
Responsive Table
A responsive table will display a horizontal scroll bar if the screen is too small to display the full content.
Add a container element (like <div>) with overflow-x:auto around the <table> element to make it responsive:
<div style="overflow-x:auto;"><table>
... table content ...
</table>
</div>
------------------------
display: block;
display: inline;
display: none;
visibility: hidden;
@reference_2
position: static;
position: relative;display: block;
display: inline;
display: none;
visibility: hidden;
@reference_2
position: fixed;
position: absolute;
An element with position: absolute; is positioned relative to the nearest positioned ancestor (instead of positioned relative to the viewport, like fixed).
However; if an absolute positioned element has no positioned ancestors, it uses the document body, and moves along with page scrolling.
Note: A "positioned" element is one whose position is anything except static.
@reference_3
However; if an absolute positioned element has no positioned ancestors, it uses the document body, and moves along with page scrolling.
Note: A "positioned" element is one whose position is anything except static.
@reference_3
Subscribe to:
Posts (Atom)