標籤:
<!doctype html><html><head><meta charset="utf-8"><title>CSS之側邊欄</title><style>*{ margin:0;padding:0; }html{height:100%;}a:link,a:visited{color:#00FF00; text-decoration:none;}#side{ display:none;}#side:checked + aside{top:0;}#side:checked ~ #wrap{ padding-top:220px;}body > aside{position:absolute;top:0;bottom:0;top:-200px; width:100%;background:#333333;transition:0.2s ease-out;-webkit-transition:0.2s ease-out;height:200px; }body > aside > h2{color:#00FF00;text-align:center; font-weight:normal; padding:10px;}#wrap{ margin-left:20px; transition:0.25s ease-out; -webkit-transition:0.25s ease-out;}#wrap > label{ background:#333333;border-radius: 15px;color: #FFF;cursor: pointer;display: block;font-family: Courier New;font-size: 25px;font-weight: bold; width: 50px;height: 50px;line-height: 35px;text-align: center;text-shadow: 0 -4px; }#wrap > label:hover{background:#000; }</style></head><body><input type=‘checkbox‘ id=‘side‘><aside><h2><a href="http://www.cnblogs.com/caidupingblogs/">冷的鋒刃</a></h2><h2><span >用冷的鋒刃琴的寂寥寫往事今朝</h2></aside></input><div id=‘wrap‘><!--側邊欄按鈕標記,注意"="只是符號--><label for=‘side‘>^</label></div></body></html>
CSS之上側邊欄