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.
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ó:
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:
Lưu tiện ích và xem kết quả nhé :)
/* icons Css3 menu bar www.seotopseo.blogspot.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/AVvXsEguy_JD-BOE4Gwtcv_o1AEkTEpr2TqsM-kT3j16Ak6Y_bFf5gPOu9I2Xo41_Z_b7JMh8OoBmZc_HgAEigSjOmnd-F4mGFHse1SgmMWARc7FxEJGkG57_Z06nJTEWfKSk1tEsndSHLvxdZM/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 href="#"><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjNaOzmVSDIOhSF3x3mHNpg7mDQxM1efFsXFXse1BCI1-slzyoT_-YFMn06BIUfyBc9KmSpfowToDF_5YyChlGPswGAhgfVKlvd-CsBaA5Nfe9NdOJcAESnyUOleDF6sPeqkmasI0TlWWY/s1600/bloggetrix-home.png" /> Home</a></li>
<li><a href="#"><span><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiCqiEsGbzfMMajSKSm_wn0U55TqAnEJK0ngPxDQzUSY0l-eRcUQR_boxDcwg-6HCPU7V9wy6rXGkw9n3Syrw3axr7ZovjTpRYYY8PAzj21W1hndU9ZCs9WOBlPIRrC4kTD737g-J1IzpM/s1600/bloggetrix-top1.png" /> HTML/CSS</span></a>
<div class="subs">
<div class="col">
<ul>
<li><a href="#"><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQMT5lOYIIdMfLnRdDGOaOR2GjxH8OFPL_rt5NwIHdEH9v6VWcNjd44vpeqstCDF3xmn4LynEK0Y7SE5ZgP5cNA56DZ1J9d5t7LbtAWLgRBvENLDOMEx2t0oxAAu2sMDWqSAb8-3gbYR4/s1600/bloggetrix-bub.png" /> Link 1</a></li>
<li><a href="#"><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQMT5lOYIIdMfLnRdDGOaOR2GjxH8OFPL_rt5NwIHdEH9v6VWcNjd44vpeqstCDF3xmn4LynEK0Y7SE5ZgP5cNA56DZ1J9d5t7LbtAWLgRBvENLDOMEx2t0oxAAu2sMDWqSAb8-3gbYR4/s1600/bloggetrix-bub.png" /> Link 2</a></li>
<li><a href="#"><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQMT5lOYIIdMfLnRdDGOaOR2GjxH8OFPL_rt5NwIHdEH9v6VWcNjd44vpeqstCDF3xmn4LynEK0Y7SE5ZgP5cNA56DZ1J9d5t7LbtAWLgRBvENLDOMEx2t0oxAAu2sMDWqSAb8-3gbYR4/s1600/bloggetrix-bub.png" /> Link 3</a></li>
<li><a href="#"><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQMT5lOYIIdMfLnRdDGOaOR2GjxH8OFPL_rt5NwIHdEH9v6VWcNjd44vpeqstCDF3xmn4LynEK0Y7SE5ZgP5cNA56DZ1J9d5t7LbtAWLgRBvENLDOMEx2t0oxAAu2sMDWqSAb8-3gbYR4/s1600/bloggetrix-bub.png" /> Link 4</a></li>
<li><a href="#"><span><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQMT5lOYIIdMfLnRdDGOaOR2GjxH8OFPL_rt5NwIHdEH9v6VWcNjd44vpeqstCDF3xmn4LynEK0Y7SE5ZgP5cNA56DZ1J9d5t7LbtAWLgRBvENLDOMEx2t0oxAAu2sMDWqSAb8-3gbYR4/s1600/bloggetrix-bub.png" /> Sublinks</span></a>
<div class="subs">
<div class="col">
<ul>
<li><a href="#"><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQMT5lOYIIdMfLnRdDGOaOR2GjxH8OFPL_rt5NwIHdEH9v6VWcNjd44vpeqstCDF3xmn4LynEK0Y7SE5ZgP5cNA56DZ1J9d5t7LbtAWLgRBvENLDOMEx2t0oxAAu2sMDWqSAb8-3gbYR4/s1600/bloggetrix-bub.png" /> Link 41</a></li>
<li><a href="#"><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQMT5lOYIIdMfLnRdDGOaOR2GjxH8OFPL_rt5NwIHdEH9v6VWcNjd44vpeqstCDF3xmn4LynEK0Y7SE5ZgP5cNA56DZ1J9d5t7LbtAWLgRBvENLDOMEx2t0oxAAu2sMDWqSAb8-3gbYR4/s1600/bloggetrix-bub.png" /> Link 42</a></li>
<li><a href="#"><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQMT5lOYIIdMfLnRdDGOaOR2GjxH8OFPL_rt5NwIHdEH9v6VWcNjd44vpeqstCDF3xmn4LynEK0Y7SE5ZgP5cNA56DZ1J9d5t7LbtAWLgRBvENLDOMEx2t0oxAAu2sMDWqSAb8-3gbYR4/s1600/bloggetrix-bub.png" /> Link 43</a></li>
<li><a href="#"><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQMT5lOYIIdMfLnRdDGOaOR2GjxH8OFPL_rt5NwIHdEH9v6VWcNjd44vpeqstCDF3xmn4LynEK0Y7SE5ZgP5cNA56DZ1J9d5t7LbtAWLgRBvENLDOMEx2t0oxAAu2sMDWqSAb8-3gbYR4/s1600/bloggetrix-bub.png" /> Link 44</a></li>
<li><a href="#"><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQMT5lOYIIdMfLnRdDGOaOR2GjxH8OFPL_rt5NwIHdEH9v6VWcNjd44vpeqstCDF3xmn4LynEK0Y7SE5ZgP5cNA56DZ1J9d5t7LbtAWLgRBvENLDOMEx2t0oxAAu2sMDWqSAb8-3gbYR4/s1600/bloggetrix-bub.png" /> Link 45</a></li>
</ul>
</div>
<div class="col">
<ul>
<li><a href="#"><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQMT5lOYIIdMfLnRdDGOaOR2GjxH8OFPL_rt5NwIHdEH9v6VWcNjd44vpeqstCDF3xmn4LynEK0Y7SE5ZgP5cNA56DZ1J9d5t7LbtAWLgRBvENLDOMEx2t0oxAAu2sMDWqSAb8-3gbYR4/s1600/bloggetrix-bub.png" /> Link 46</a></li>
<li><a href="#"><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQMT5lOYIIdMfLnRdDGOaOR2GjxH8OFPL_rt5NwIHdEH9v6VWcNjd44vpeqstCDF3xmn4LynEK0Y7SE5ZgP5cNA56DZ1J9d5t7LbtAWLgRBvENLDOMEx2t0oxAAu2sMDWqSAb8-3gbYR4/s1600/bloggetrix-bub.png" /> Link 47</a></li>
<li><a href="#"><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQMT5lOYIIdMfLnRdDGOaOR2GjxH8OFPL_rt5NwIHdEH9v6VWcNjd44vpeqstCDF3xmn4LynEK0Y7SE5ZgP5cNA56DZ1J9d5t7LbtAWLgRBvENLDOMEx2t0oxAAu2sMDWqSAb8-3gbYR4/s1600/bloggetrix-bub.png" /> Link 48</a></li>
<li><a href="#"><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQMT5lOYIIdMfLnRdDGOaOR2GjxH8OFPL_rt5NwIHdEH9v6VWcNjd44vpeqstCDF3xmn4LynEK0Y7SE5ZgP5cNA56DZ1J9d5t7LbtAWLgRBvENLDOMEx2t0oxAAu2sMDWqSAb8-3gbYR4/s1600/bloggetrix-bub.png" /> Link 49</a></li>
</ul>
</div>
</div>
</li>
</ul>
</div>
<div class="col">
<ul>
<li><a href="#"><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQMT5lOYIIdMfLnRdDGOaOR2GjxH8OFPL_rt5NwIHdEH9v6VWcNjd44vpeqstCDF3xmn4LynEK0Y7SE5ZgP5cNA56DZ1J9d5t7LbtAWLgRBvENLDOMEx2t0oxAAu2sMDWqSAb8-3gbYR4/s1600/bloggetrix-bub.png" /> Link 6</a></li>
<li><a href="#"><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQMT5lOYIIdMfLnRdDGOaOR2GjxH8OFPL_rt5NwIHdEH9v6VWcNjd44vpeqstCDF3xmn4LynEK0Y7SE5ZgP5cNA56DZ1J9d5t7LbtAWLgRBvENLDOMEx2t0oxAAu2sMDWqSAb8-3gbYR4/s1600/bloggetrix-bub.png" /> Link 7</a></li>
<li><a href="#"><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQMT5lOYIIdMfLnRdDGOaOR2GjxH8OFPL_rt5NwIHdEH9v6VWcNjd44vpeqstCDF3xmn4LynEK0Y7SE5ZgP5cNA56DZ1J9d5t7LbtAWLgRBvENLDOMEx2t0oxAAu2sMDWqSAb8-3gbYR4/s1600/bloggetrix-bub.png" /> Link 8</a></li>
<li><a href="#"><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQMT5lOYIIdMfLnRdDGOaOR2GjxH8OFPL_rt5NwIHdEH9v6VWcNjd44vpeqstCDF3xmn4LynEK0Y7SE5ZgP5cNA56DZ1J9d5t7LbtAWLgRBvENLDOMEx2t0oxAAu2sMDWqSAb8-3gbYR4/s1600/bloggetrix-bub.png" /> Link 9</a></li>
<li><a href="#"><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQMT5lOYIIdMfLnRdDGOaOR2GjxH8OFPL_rt5NwIHdEH9v6VWcNjd44vpeqstCDF3xmn4LynEK0Y7SE5ZgP5cNA56DZ1J9d5t7LbtAWLgRBvENLDOMEx2t0oxAAu2sMDWqSAb8-3gbYR4/s1600/bloggetrix-bub.png" /> Link 10</a></li>
</ul>
</div>
</div>
</li>
<li><a href="#"><span><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhgg1dHLUzEMv9oMgL9ZrtsBB7hWOo_RMchBBXOdOJabRCIJDrdU5NO3b-ps4iH5i6m6R8tivC0TW2czn0taRV8DXATSp1gmgewrTcsxoiUFoznMrP0WIGftwHWhlHAjeKfciL2Y3flP2c/s1600/bloggetrix-top2.png" /> jQuery/JS</span></a>
<div class="subs">
<div class="col">
<ul>
<li><a href="#"><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQMT5lOYIIdMfLnRdDGOaOR2GjxH8OFPL_rt5NwIHdEH9v6VWcNjd44vpeqstCDF3xmn4LynEK0Y7SE5ZgP5cNA56DZ1J9d5t7LbtAWLgRBvENLDOMEx2t0oxAAu2sMDWqSAb8-3gbYR4/s1600/bloggetrix-bub.png" /> Link 1</a></li>
<li><a href="#"><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQMT5lOYIIdMfLnRdDGOaOR2GjxH8OFPL_rt5NwIHdEH9v6VWcNjd44vpeqstCDF3xmn4LynEK0Y7SE5ZgP5cNA56DZ1J9d5t7LbtAWLgRBvENLDOMEx2t0oxAAu2sMDWqSAb8-3gbYR4/s1600/bloggetrix-bub.png" /> Link 2</a></li>
<li><a href="#"><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQMT5lOYIIdMfLnRdDGOaOR2GjxH8OFPL_rt5NwIHdEH9v6VWcNjd44vpeqstCDF3xmn4LynEK0Y7SE5ZgP5cNA56DZ1J9d5t7LbtAWLgRBvENLDOMEx2t0oxAAu2sMDWqSAb8-3gbYR4/s1600/bloggetrix-bub.png" /> Link 3</a></li>
<li><a href="#"><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQMT5lOYIIdMfLnRdDGOaOR2GjxH8OFPL_rt5NwIHdEH9v6VWcNjd44vpeqstCDF3xmn4LynEK0Y7SE5ZgP5cNA56DZ1J9d5t7LbtAWLgRBvENLDOMEx2t0oxAAu2sMDWqSAb8-3gbYR4/s1600/bloggetrix-bub.png" /> Link 4</a></li>
<li><a href="#"><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQMT5lOYIIdMfLnRdDGOaOR2GjxH8OFPL_rt5NwIHdEH9v6VWcNjd44vpeqstCDF3xmn4LynEK0Y7SE5ZgP5cNA56DZ1J9d5t7LbtAWLgRBvENLDOMEx2t0oxAAu2sMDWqSAb8-3gbYR4/s1600/bloggetrix-bub.png" /> Link 5</a></li>
</ul>
</div>
<div class="col">
<ul>
<li><a href="#"><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQMT5lOYIIdMfLnRdDGOaOR2GjxH8OFPL_rt5NwIHdEH9v6VWcNjd44vpeqstCDF3xmn4LynEK0Y7SE5ZgP5cNA56DZ1J9d5t7LbtAWLgRBvENLDOMEx2t0oxAAu2sMDWqSAb8-3gbYR4/s1600/bloggetrix-bub.png" /> Link 6</a></li>
<li><a href="#"><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQMT5lOYIIdMfLnRdDGOaOR2GjxH8OFPL_rt5NwIHdEH9v6VWcNjd44vpeqstCDF3xmn4LynEK0Y7SE5ZgP5cNA56DZ1J9d5t7LbtAWLgRBvENLDOMEx2t0oxAAu2sMDWqSAb8-3gbYR4/s1600/bloggetrix-bub.png" /> Link 7</a></li>
<li><a href="#"><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQMT5lOYIIdMfLnRdDGOaOR2GjxH8OFPL_rt5NwIHdEH9v6VWcNjd44vpeqstCDF3xmn4LynEK0Y7SE5ZgP5cNA56DZ1J9d5t7LbtAWLgRBvENLDOMEx2t0oxAAu2sMDWqSAb8-3gbYR4/s1600/bloggetrix-bub.png" /> Link 8</a></li>
<li><a href="#"><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQMT5lOYIIdMfLnRdDGOaOR2GjxH8OFPL_rt5NwIHdEH9v6VWcNjd44vpeqstCDF3xmn4LynEK0Y7SE5ZgP5cNA56DZ1J9d5t7LbtAWLgRBvENLDOMEx2t0oxAAu2sMDWqSAb8-3gbYR4/s1600/bloggetrix-bub.png" /> Link 9</a></li>
<li><a href="#"><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQMT5lOYIIdMfLnRdDGOaOR2GjxH8OFPL_rt5NwIHdEH9v6VWcNjd44vpeqstCDF3xmn4LynEK0Y7SE5ZgP5cNA56DZ1J9d5t7LbtAWLgRBvENLDOMEx2t0oxAAu2sMDWqSAb8-3gbYR4/s1600/bloggetrix-bub.png" /> Link 10</a></li>
</ul>
</div>
</div>
</li>
<li><a href="#"><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh2EJLHcu8maNyPm2s-HCHb-2gd2esDOyR46OfnoVqdk8EWHGCB5s9G1QS1NJpzMcCfsc5lR99DOftCPMSYBrmsnGb95hOUQlSHaCklGZP4AmV976UILLZTRsE1jd5xk392uE0cybnFXAs/s1600/bloggetrix-top3.png" /> PHP</a></li>
<li><a href="#"><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEihq_718vAgJNq30Q4cg67y8BU_WVGDmXqJi1jqvB4aIo2krS-dUNRKCht6QaXvu1SPQ_JIdL8nkQZBFqL8651KfgIyGytwxCl5m5IZh0zjIrwJLlhAQypgC-vXXU82lCvr_eK-jS2lIxA/s1600/bloggetrix-top4.png" /> MySQL</a></li>
<li><a href="#"><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2RSp3fOVF6djhURz9U7QCbnQVb-Xrsdg57-4gTFZNMcTnxYH-tTDRkwPY2l0X1hIrKGHePRM8Ek-N9qXXQaN0LdjPX6rkOOshISO-N0gM0h6BZqEODpFyyLNyTyPPSb1rfyMDhjqFKoU/s1600/bloggetrix-top5.png" /> XSLT</a></li>
</ul>
Lưu tiện ích và xem kết quả nhé :)