Hôm nay Tanchau123 muốn chia sẽ cùng các bạn thủ thuật tạo thanh menu dọc trượt ngang cho blog / web. Khi ta rê chuột vào thì thanh menu sẽ trượt ngang về bên phải làm cho blog / web bạn trông có vẻ mượt hơn. Thôi không nói nhiều nữa "show hàng" thôi ^^
CÁC BƯỚC THỰC HIỆN:1. Đăng nhập Blogger.2. Vào Thiết Kế => Chỉnh sửa HTML (mở rộng mẫu tiện ích)3. Chèn đoạn code sau trên thẻ ]]></b:skin> trong template của bạn./* CSS Navigation Menu - Code by http://tanchau123.blogspot.com */
margin:0;
padding:0;
}
#navigationMenu body{
font-size:14px;
color:#666;
background:#111 no-repeat;
/* CSS3 Radial Gradients */
background-image:-moz-radial-gradient(center -100px 45deg, circle farthest-corner, #444 150px, #111 300px);
background-image:-webkit-gradient(radial, 50% 0, 150, 50% 0, 300, from(#444), to(#111));
font-family:Arial, Helvetica, sans-serif;
}
#navigationMenu li{
list-style:none;
height:39px;
padding:2px;
width:40px;
}
#navigationMenu span{
/* Container properties */
width:0;
left:38px;
padding:0;
position:absolute;
overflow:hidden;
/* Text properties */
font-family:'Myriad Pro',Arial, Helvetica, sans-serif;
font-size:18px;
font-weight:bold;
letter-spacing:0.6px;
white-space:nowrap;
line-height:39px;
/* CSS3 Transition: */
-webkit-transition: 0.25s;
/* Future proofing (these do not work yet): */
-moz-transition: 0.25s;
transition: 0.25s;
}
#navigationMenu a{
background:url('https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiBgZsioG15iRQ6wZ138J7y9lI9h3aBjbZ3uOOfZZxlLZOPYdwQ8NghC4C-uDwWoVRhgWvqlrL52aoqwzS3Ue6J7v26NHSya-2NJIziac2msqFHhbJRbW7QYD51Uz5dEG9EHeqwpVoG8oM/s190/navigation1.jpg') no-repeat;
height:39px;
width:38px;
display:block;
position:relative;
}
/* General hover styles */
#navigationMenu a:hover span{ width:auto; padding:0 20px;overflow:visible; }
#navigationMenu a:hover{
text-decoration:none;
/* CSS outer glow with the box-shadow property */
-moz-box-shadow:0 0 5px #9ddff5;
-webkit-box-shadow:0 0 5px #9ddff5;
box-shadow:0 0 5px #9ddff5;
}
/* Green Button */
#navigationMenu .home { background-position:0 0;}
#navigationMenu .home:hover { background-position:0 -39px;}
#navigationMenu .home span{
background-color:#7da315;
color:#3d4f0c;
text-shadow:1px 1px 0 #99bf31;
}
/* Blue Button */
#navigationMenu .about { background-position:-38px 0;}
#navigationMenu .about:hover { background-position:-38px -39px;}
#navigationMenu .about span{
background-color:#1e8bb4;
color:#223a44;
text-shadow:1px 1px 0 #44a8d0;
}
/* Orange Button */
#navigationMenu .services { background-position:-76px 0;}
#navigationMenu .services:hover { background-position:-76px -39px;}
#navigationMenu .services span{
background-color:#c86c1f;
color:#5a3517;
text-shadow:1px 1px 0 #d28344;
}
/* Yellow Button */
#navigationMenu .portfolio { background-position:-114px 0;}
#navigationMenu .portfolio:hover{ background-position:-114px -39px;}
#navigationMenu .portfolio span{
background-color:#d0a525;
color:#604e18;
text-shadow:1px 1px 0 #d8b54b;
}
/* Purple Button */
#navigationMenu .contact { background-position:-152px 0;}
#navigationMenu .contact:hover { background-position:-152px -39px;}
#navigationMenu .contact span{
background-color:#af1e83;
color:#460f35;
text-shadow:1px 1px 0 #d244a6;
}
4. Lưu template lại và trở về Phần Tử Trang.5. Chọn Thêm Tiện Ích => HTML/Javascript => paste toàn bộ đoạn code sau vào:<div style='position: fixed; top: 40%; left: 0%;'/>
<ul id="navigationMenu">
<li>
<a class="Home" href="
http://thietke-dohoa.blogspot.com/">
<span>
Trang Chủ</span>
</a>
</li>
<li>
<a class="about" href="
http://thietke-dohoa.blogspot.com/2011/12/dich-vu-cua-chung-toi.html">
<span>
Dịch Vụ</span>
</a>
</li>
<li>
<a class="services" href="
http://thietke-dohoa.blogspot.com/search/label/Thi%E1%BA%BFt%20k%E1%BA%BF?max-results=6">
<span>
Thiết Kế</span>
</a>
</li>
<li>
<a class="portfolio" href="
http://thietke-dohoa.blogspot.com/search/label/Qu%E1%BA%A3n%20tr%E1%BB%8B%20m%E1%BA%A1ng?max-results=6">
<span>
Quản Trị</span>
</a>
</li>
<li>
<a class="contact" href="
http://thietke-dohoa.blogspot.com/2011/12/lien-he.html">
<span>
Liên Hệ</span>
</a>
</li>
</ul>
</div>
CHÚ Ý: Nhớ sửa các dòng
màu đỏ ở trên lại cho phù hợp với blog / web bạn.
6. Lưu lại và thưởng thức thôi.Chúc các bạn thành công!!!
Ý kiến bạn đọc [ 0 ]
Ý kiến của bạn