Pages

Thứ Sáu, 12 tháng 4, 2013

Menu CSS3 bar đẹp đa tầng với icon riêng cho Web, Blogspot

Menu sử dụng CSS3 luôn tạo cho chúng ta độ bóng bo rất đẹp, làm thế nào để thêm menu CSS3 bar cho blogger? Code menu CSS3 ngang cho Website, blog.
Thủ thuật hôm nay mình chia sẻ tới các bạn dùng cho Web và blogspot. 1 dạng menu rất thích hợp với Website, blog có nội dung nhiều chuyên mục con.
Menu CSS3 bar, Menu CSS3 đẹp
Hướng dẫn cách thêm menu này trên Blogspot
1. Vào bảng điều khiển Blogger -> Mẫu (Template) -> Chỉnh sửa HTML (Edit HTML)
2. Tìm tới thẻ > ]]></b:skin> và dán code dưới đây ngay trên nó:

/* icons Css3 menu bar www.itviet360.com*/

ul#navbt {
display:block;
float:left;
font-family:Trebuchet MS,sans-serif;
font-size:0;
padding:5px 5px 5px 0;

background: -moz-linear-gradient(#f5f5f5, #c4c4c4); /* FF 3.6+ */
background: -ms-linear-gradient(#f5f5f5, #c4c4c4); /* IE10 */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #f5f5f5), color-stop(100%, #c4c4c4)); /* Safari 4+, Chrome 2+ */
background: -webkit-linear-gradient(#f5f5f5, #c4c4c4); /* Safari 5.1+, Chrome 10+ */
background: -o-linear-gradient(#f5f5f5, #c4c4c4); /* Opera 11.10 */
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#f5f5f5', endColorstr='#c4c4c4'); /* IE6 & IE7 */
-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr='#f5f5f5', endColorstr='#c4c4c4')"; /* IE8+ */
background: linear-gradient(#f5f5f5, #c4c4c4); /* the standard */
}
ul#navbt,ul#navbt ul {
list-style:none;
margin:0;
}
ul#navbt,ul#navbt .subs {
background-color:#444;
border:1px solid #454545;

border-radius:9px;
-moz-border-radius:9px;
-webkit-border-radius:9px;
}
ul#navbt .subs {
background-color:#fff;
border:2px solid #222;
display:none;
float:left;
left:0;
padding:0 6px 6px;
position:absolute;
top:100%;
width:300px;

border-radius:7px;
-moz-border-radius:7px;
-webkit-border-radius:7px;
}
ul#navbt li:hover>* {
display:block;
}
ul#navbt li:hover {
position:relative;
}
ul#navbt ul .subs {
left:100%;
position:absolute;
top:0;
}
ul#navbt ul {
padding:0 5px 5px;
}
ul#navbt .col {
float:left;
width:50%;
}
ul#navbt li {
display:block;
float:left;
font-size:0;
white-space:nowrap;
}
ul#navbt>li,ul#navbt li {
margin:0 0 0 5px;
}
ul#navbt ul>li {
margin:5px 0 0;
}
ul#navbt a:active,ul#navbt a:focus {
outline-style:none;
}
ul#navbt a {
border-style:none;
border-width:0;
color:#181818;
cursor:pointer;
display:block;
font-size:13px;
font-weight:bold;
padding:8px 18px;
text-align:left;
text-decoration:none;
text-shadow:#fff 0 1px 1px;
vertical-align:middle;
}
ul#navbt ul li {
float:none;
margin:6px 0 0;
}
ul#navbt ul a {
background-color:#fff;
border-color:#efefef;
border-style:solid;
border-width:0 0 1px;
color:#000;
font-size:11px;
padding:4px;
text-align:left;
text-decoration:none;
text-shadow:#fff 0 0 0;

border-radius:0;
-moz-border-radius:0;
-webkit-border-radius:0;
}
ul#navbt li:hover>a {
border-style:none;
color:#fff;
font-size:13px;
font-weight:bold;
text-decoration:none;
text-shadow:#181818 0 1px 1px;
}
ul#navbt img {
border:none;
margin-right:8px;
vertical-align:middle;
}
ul#navbt span {
background-position:right center;
background-repeat:no-repeat;
display:block;
overflow:visible;
padding-right:0;
}
ul#navbt ul span {
background-image:url("https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkd3fe_jo4_FU5LG34XlL5IxyVgtqxxedK49ahJqFQl469Q8ygGzfU6Lh_K6EdUYP222KMDijMOtAvuVYY35rmO_Ufh1j7k5tn_yRmnwfMP472kXUL2cIR7upmtRg0uJrPOsvLbQ0KcM0/s1600/bloggetrix-arrow.png");
padding-right:20px;
}
ul#navbt ul li:hover>a {
border-color:#444;
border-style:solid;
color:#444;
font-size:11px;
text-decoration:none;
text-shadow:#fff 0 0 0;
}
ul#navbt > li >a {
background-color:transpa;
height:25px;
line-height:25px;

border-radius:11px;
-moz-border-radius:11px;
-webkit-border-radius:11px;
}
ul#navbt > li:hover > a {
background-color:#313638;
line-height:25px;
}

Lưu mẫu lại.
3. Vào bố cục (Layout) -> Thêm tiện ích (Add a widget) -> HTML/Javascript
4. Dán đoạn code dưới đây vào tiện ích vừa thêm:

<ul id="navbt">
<li><a hrefs="#"><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj8fHcRKe6PkF3yWlJfpTDHkmVGFc6dZFpU7sLiy7CSKWUUzQ66iazYWUGXWJGhlVw6WVGwtxR76Czq3LM3FRT9wYqYsQH3la7vaM-3bD0VJ5BBBQfFbzoRGVW4mU7USWFkH9KowtEx0RM/s1600/bloggetrix-home.png" /> Home</a></li>
<li><a hrefs="#"><span><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg81Rp40oX-5y8bbr1yn_cjfnq33d3EvqmLbR6Le1Bwgyk5ixSp1VjfWdKvyl7zZqsT6toMBr2kLln4euNVwxxQjpGJiA4k038MofzMrrqYpXWBARNs5Nv-4VATAjru2_yapb9Py_ncTqs/s1600/bloggetrix-top1.png" /> HTML/CSS</span></a>
<div class="subs">
<div class="col">
<ul>
<li><a hrefs="#"><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgO7yWZDHt1On3pRs99YHDcsE3tKuXfZPDOL6BPLF_q2GZ4QlBnAyDJj22lFSSGm5BH3KkRGPx3NZwD5OENvGPkRaZ0XwvQk0vzLEgvGaCWMQzyu4FE-u3ENUmMbYmUpvT3WJT7aTMXzNQ/s1600/bloggetrix-bub.png" /> Link 1</a></li>
<li><a hrefs="#"><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgO7yWZDHt1On3pRs99YHDcsE3tKuXfZPDOL6BPLF_q2GZ4QlBnAyDJj22lFSSGm5BH3KkRGPx3NZwD5OENvGPkRaZ0XwvQk0vzLEgvGaCWMQzyu4FE-u3ENUmMbYmUpvT3WJT7aTMXzNQ/s1600/bloggetrix-bub.png" /> Link 2</a></li>
<li><a hrefs="#"><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgO7yWZDHt1On3pRs99YHDcsE3tKuXfZPDOL6BPLF_q2GZ4QlBnAyDJj22lFSSGm5BH3KkRGPx3NZwD5OENvGPkRaZ0XwvQk0vzLEgvGaCWMQzyu4FE-u3ENUmMbYmUpvT3WJT7aTMXzNQ/s1600/bloggetrix-bub.png" /> Link 3</a></li>
<li><a hrefs="#"><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgO7yWZDHt1On3pRs99YHDcsE3tKuXfZPDOL6BPLF_q2GZ4QlBnAyDJj22lFSSGm5BH3KkRGPx3NZwD5OENvGPkRaZ0XwvQk0vzLEgvGaCWMQzyu4FE-u3ENUmMbYmUpvT3WJT7aTMXzNQ/s1600/bloggetrix-bub.png" /> Link 4</a></li>
<li><a hrefs="#"><span><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgO7yWZDHt1On3pRs99YHDcsE3tKuXfZPDOL6BPLF_q2GZ4QlBnAyDJj22lFSSGm5BH3KkRGPx3NZwD5OENvGPkRaZ0XwvQk0vzLEgvGaCWMQzyu4FE-u3ENUmMbYmUpvT3WJT7aTMXzNQ/s1600/bloggetrix-bub.png" /> Sublinks</span></a>
<div class="subs">
<div class="col">
<ul>
<li><a hrefs="#"><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgO7yWZDHt1On3pRs99YHDcsE3tKuXfZPDOL6BPLF_q2GZ4QlBnAyDJj22lFSSGm5BH3KkRGPx3NZwD5OENvGPkRaZ0XwvQk0vzLEgvGaCWMQzyu4FE-u3ENUmMbYmUpvT3WJT7aTMXzNQ/s1600/bloggetrix-bub.png" /> Link 41</a></li>
<li><a hrefs="#"><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgO7yWZDHt1On3pRs99YHDcsE3tKuXfZPDOL6BPLF_q2GZ4QlBnAyDJj22lFSSGm5BH3KkRGPx3NZwD5OENvGPkRaZ0XwvQk0vzLEgvGaCWMQzyu4FE-u3ENUmMbYmUpvT3WJT7aTMXzNQ/s1600/bloggetrix-bub.png" /> Link 42</a></li>
<li><a hrefs="#"><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgO7yWZDHt1On3pRs99YHDcsE3tKuXfZPDOL6BPLF_q2GZ4QlBnAyDJj22lFSSGm5BH3KkRGPx3NZwD5OENvGPkRaZ0XwvQk0vzLEgvGaCWMQzyu4FE-u3ENUmMbYmUpvT3WJT7aTMXzNQ/s1600/bloggetrix-bub.png" /> Link 43</a></li>
<li><a hrefs="#"><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgO7yWZDHt1On3pRs99YHDcsE3tKuXfZPDOL6BPLF_q2GZ4QlBnAyDJj22lFSSGm5BH3KkRGPx3NZwD5OENvGPkRaZ0XwvQk0vzLEgvGaCWMQzyu4FE-u3ENUmMbYmUpvT3WJT7aTMXzNQ/s1600/bloggetrix-bub.png" /> Link 44</a></li>
<li><a hrefs="#"><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgO7yWZDHt1On3pRs99YHDcsE3tKuXfZPDOL6BPLF_q2GZ4QlBnAyDJj22lFSSGm5BH3KkRGPx3NZwD5OENvGPkRaZ0XwvQk0vzLEgvGaCWMQzyu4FE-u3ENUmMbYmUpvT3WJT7aTMXzNQ/s1600/bloggetrix-bub.png" /> Link 45</a></li>
</ul>
</div>
<div class="col">
<ul>
<li><a hrefs="#"><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgO7yWZDHt1On3pRs99YHDcsE3tKuXfZPDOL6BPLF_q2GZ4QlBnAyDJj22lFSSGm5BH3KkRGPx3NZwD5OENvGPkRaZ0XwvQk0vzLEgvGaCWMQzyu4FE-u3ENUmMbYmUpvT3WJT7aTMXzNQ/s1600/bloggetrix-bub.png" /> Link 46</a></li>
<li><a hrefs="#"><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgO7yWZDHt1On3pRs99YHDcsE3tKuXfZPDOL6BPLF_q2GZ4QlBnAyDJj22lFSSGm5BH3KkRGPx3NZwD5OENvGPkRaZ0XwvQk0vzLEgvGaCWMQzyu4FE-u3ENUmMbYmUpvT3WJT7aTMXzNQ/s1600/bloggetrix-bub.png" /> Link 47</a></li>
<li><a hrefs="#"><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgO7yWZDHt1On3pRs99YHDcsE3tKuXfZPDOL6BPLF_q2GZ4QlBnAyDJj22lFSSGm5BH3KkRGPx3NZwD5OENvGPkRaZ0XwvQk0vzLEgvGaCWMQzyu4FE-u3ENUmMbYmUpvT3WJT7aTMXzNQ/s1600/bloggetrix-bub.png" /> Link 48</a></li>
<li><a hrefs="#"><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgO7yWZDHt1On3pRs99YHDcsE3tKuXfZPDOL6BPLF_q2GZ4QlBnAyDJj22lFSSGm5BH3KkRGPx3NZwD5OENvGPkRaZ0XwvQk0vzLEgvGaCWMQzyu4FE-u3ENUmMbYmUpvT3WJT7aTMXzNQ/s1600/bloggetrix-bub.png" /> Link 49</a></li>
</ul>
</div>
</div>
</li>
</ul>
</div>
<div class="col">
<ul>
<li><a hrefs="#"><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgO7yWZDHt1On3pRs99YHDcsE3tKuXfZPDOL6BPLF_q2GZ4QlBnAyDJj22lFSSGm5BH3KkRGPx3NZwD5OENvGPkRaZ0XwvQk0vzLEgvGaCWMQzyu4FE-u3ENUmMbYmUpvT3WJT7aTMXzNQ/s1600/bloggetrix-bub.png" /> Link 6</a></li>
<li><a hrefs="#"><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgO7yWZDHt1On3pRs99YHDcsE3tKuXfZPDOL6BPLF_q2GZ4QlBnAyDJj22lFSSGm5BH3KkRGPx3NZwD5OENvGPkRaZ0XwvQk0vzLEgvGaCWMQzyu4FE-u3ENUmMbYmUpvT3WJT7aTMXzNQ/s1600/bloggetrix-bub.png" /> Link 7</a></li>
<li><a hrefs="#"><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgO7yWZDHt1On3pRs99YHDcsE3tKuXfZPDOL6BPLF_q2GZ4QlBnAyDJj22lFSSGm5BH3KkRGPx3NZwD5OENvGPkRaZ0XwvQk0vzLEgvGaCWMQzyu4FE-u3ENUmMbYmUpvT3WJT7aTMXzNQ/s1600/bloggetrix-bub.png" /> Link 8</a></li>
<li><a hrefs="#"><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgO7yWZDHt1On3pRs99YHDcsE3tKuXfZPDOL6BPLF_q2GZ4QlBnAyDJj22lFSSGm5BH3KkRGPx3NZwD5OENvGPkRaZ0XwvQk0vzLEgvGaCWMQzyu4FE-u3ENUmMbYmUpvT3WJT7aTMXzNQ/s1600/bloggetrix-bub.png" /> Link 9</a></li>
<li><a hrefs="#"><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgO7yWZDHt1On3pRs99YHDcsE3tKuXfZPDOL6BPLF_q2GZ4QlBnAyDJj22lFSSGm5BH3KkRGPx3NZwD5OENvGPkRaZ0XwvQk0vzLEgvGaCWMQzyu4FE-u3ENUmMbYmUpvT3WJT7aTMXzNQ/s1600/bloggetrix-bub.png" /> Link 10</a></li>
</ul>
</div>
</div>
</li>
<li><a hrefs="#"><span><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg_8Y0MwCpo8bmTjV47p-98rjlYrEKzmOq73MiSI1SSHoZTDd3q8GxUt_Z93H8JYQhOLj027tCod4xgxAwjm9ojsAfsdSji9m8mVzGwGyJgS1xrBIKuuwu_duXkZb5p0H0nxGkj7Iq88Zc/s1600/bloggetrix-top2.png" /> jQuery/JS</span></a>
<div class="subs">
<div class="col">
<ul>
<li><a hrefs="#"><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgO7yWZDHt1On3pRs99YHDcsE3tKuXfZPDOL6BPLF_q2GZ4QlBnAyDJj22lFSSGm5BH3KkRGPx3NZwD5OENvGPkRaZ0XwvQk0vzLEgvGaCWMQzyu4FE-u3ENUmMbYmUpvT3WJT7aTMXzNQ/s1600/bloggetrix-bub.png" /> Link 1</a></li>
<li><a hrefs="#"><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgO7yWZDHt1On3pRs99YHDcsE3tKuXfZPDOL6BPLF_q2GZ4QlBnAyDJj22lFSSGm5BH3KkRGPx3NZwD5OENvGPkRaZ0XwvQk0vzLEgvGaCWMQzyu4FE-u3ENUmMbYmUpvT3WJT7aTMXzNQ/s1600/bloggetrix-bub.png" /> Link 2</a></li>
<li><a hrefs="#"><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgO7yWZDHt1On3pRs99YHDcsE3tKuXfZPDOL6BPLF_q2GZ4QlBnAyDJj22lFSSGm5BH3KkRGPx3NZwD5OENvGPkRaZ0XwvQk0vzLEgvGaCWMQzyu4FE-u3ENUmMbYmUpvT3WJT7aTMXzNQ/s1600/bloggetrix-bub.png" /> Link 3</a></li>
<li><a hrefs="#"><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgO7yWZDHt1On3pRs99YHDcsE3tKuXfZPDOL6BPLF_q2GZ4QlBnAyDJj22lFSSGm5BH3KkRGPx3NZwD5OENvGPkRaZ0XwvQk0vzLEgvGaCWMQzyu4FE-u3ENUmMbYmUpvT3WJT7aTMXzNQ/s1600/bloggetrix-bub.png" /> Link 4</a></li>
<li><a hrefs="#"><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgO7yWZDHt1On3pRs99YHDcsE3tKuXfZPDOL6BPLF_q2GZ4QlBnAyDJj22lFSSGm5BH3KkRGPx3NZwD5OENvGPkRaZ0XwvQk0vzLEgvGaCWMQzyu4FE-u3ENUmMbYmUpvT3WJT7aTMXzNQ/s1600/bloggetrix-bub.png" /> Link 5</a></li>
</ul>
</div>
<div class="col">
<ul>
<li><a hrefs="#"><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgO7yWZDHt1On3pRs99YHDcsE3tKuXfZPDOL6BPLF_q2GZ4QlBnAyDJj22lFSSGm5BH3KkRGPx3NZwD5OENvGPkRaZ0XwvQk0vzLEgvGaCWMQzyu4FE-u3ENUmMbYmUpvT3WJT7aTMXzNQ/s1600/bloggetrix-bub.png" /> Link 6</a></li>
<li><a hrefs="#"><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgO7yWZDHt1On3pRs99YHDcsE3tKuXfZPDOL6BPLF_q2GZ4QlBnAyDJj22lFSSGm5BH3KkRGPx3NZwD5OENvGPkRaZ0XwvQk0vzLEgvGaCWMQzyu4FE-u3ENUmMbYmUpvT3WJT7aTMXzNQ/s1600/bloggetrix-bub.png" /> Link 7</a></li>
<li><a hrefs="#"><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgO7yWZDHt1On3pRs99YHDcsE3tKuXfZPDOL6BPLF_q2GZ4QlBnAyDJj22lFSSGm5BH3KkRGPx3NZwD5OENvGPkRaZ0XwvQk0vzLEgvGaCWMQzyu4FE-u3ENUmMbYmUpvT3WJT7aTMXzNQ/s1600/bloggetrix-bub.png" /> Link 8</a></li>
<li><a hrefs="#"><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgO7yWZDHt1On3pRs99YHDcsE3tKuXfZPDOL6BPLF_q2GZ4QlBnAyDJj22lFSSGm5BH3KkRGPx3NZwD5OENvGPkRaZ0XwvQk0vzLEgvGaCWMQzyu4FE-u3ENUmMbYmUpvT3WJT7aTMXzNQ/s1600/bloggetrix-bub.png" /> Link 9</a></li>
<li><a hrefs="#"><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgO7yWZDHt1On3pRs99YHDcsE3tKuXfZPDOL6BPLF_q2GZ4QlBnAyDJj22lFSSGm5BH3KkRGPx3NZwD5OENvGPkRaZ0XwvQk0vzLEgvGaCWMQzyu4FE-u3ENUmMbYmUpvT3WJT7aTMXzNQ/s1600/bloggetrix-bub.png" /> Link 10</a></li>
</ul>
</div>
</div>
</li>
<li><a hrefs="#"><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2HfGP0XQIktQwevqLcD48JillpUtHIhkPtAheM8x1P_A9BqfJ7EtN2fcNqWbJ-Knw3zXwQcj5RdsI3-sTTg6T-DVXshZYkeK5EcaoEUulzj42VtRoD8mc0fzIY3c6wpqbvf93XatVzpk/s1600/bloggetrix-top3.png" /> PHP</a></li>
<li><a hrefs="#"><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgE__VYwo9fvtZ2qmuHp2zEyNt8n_egEHtsiL57EHExJyVrWsjZGwLW2SAWAMmQIUClaIQdjajZAEwtXtU5iu5ErZLMEDF-dY477AzrMD8dSXMi2aYUk0wjl8Mat9DwUAfrIoNxoCTzchM/s1600/bloggetrix-top4.png" /> MySQL</a></li>
<li><a hrefs="#"><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiC4k2XA6R-BDIdKegR0zV_iLPb-KWUSZg0diNnYNvHMmkEBjzHxEKFju-MoiCTD-T8XDkHD73qtQ5IbsQv5h0NqWuXn2U71QqI-AxlB52BamnLa63hc_IArkDYVUAEJD7HC76SL70L0Q0/s1600/bloggetrix-top5.png" /> XSLT</a></li>
</ul>

Lưu tiện ích và xem kết quả nhé :)

Không có nhận xét nào:

Đăng nhận xét