Tạo ô Search đẹp cho Blogpot
Hình Demo. |
# Thêm HTML/Javascript:
- Đăng nhập Blogger
- Bố cục > Thêm tiện ích > HTML / Javascript
- Dán code vào và save.
Code:
<style>#searchbox {
background: #d8d8d8;
border: 4px solid #e8e8e8;
padding: 20px 10px;
width: 250px;
}
input:focus::-webkit-input-placeholder {
color: transparent;
}
input:focus:-moz-placeholder {
color: transparent;
}
input:focus::-moz-placeholder {
color: transparent;
}
#searchbox input {
outline: none;
}
#searchbox input[type="text"] {
background: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEinJRVZVMR0xIptTM0mwRe0nMLl0qg2BJmxwv_Z6USqOUuA8ftxd_OJyE_EK3SivGibEToX4wtQFNpIpc6f4kIF_bDkLc5zCheUpl3tuwI0atCjdTqZobHu3j8LTavXvxlNSVi-Fumc9aER/s1600/search-dark.png) no-repeat 10px 6px #fff;
border-width: 1px;
border-style: solid;
border-color: #fff;
font: bold 12px Arial,Helvetica,Sans-serif;
color: #bebebe;
width: 55%;
padding: 8px 15px 8px 30px;
}
#button-submit {
background: #6A6F75;
border-width: 0px;
padding: 9px 0px;
width: 23%;
cursor: pointer;
font: bold 12px Arial, Helvetica;
color: #fff;
text-shadow: 0 1px 0 #555;
}
#button-submit:hover {
background: #4f5356;
}
#button-submit:active {
background: #5b5d60;
outline: none;
}
#button-submit::-moz-focus-inner {
border: 0;
}
</style>
<form id="searchbox" method="get" action="/search">
<input name="q" type="text" size="15" placeholder="Type here..." />
<input id="button-submit" type="submit" value="Search" />
</form>
EmoticonEmoticon