Khung search sẽ giúp độc giả dễ dàng tìm kiếm một nội dung nào đó trên blog của bạn, Blogger đã cung cấp cho chúng ta sẵn một mẫu khung search nhưng nó không đẹp lắm. Hôm nay, mình xin giới thiệu với các bạn 6 mẫu khung search rất đẹp.
#Thêm HTML/Javascrip
1. Đăng nhập Blogger2. > Bố cục > Thêm tiện ích > HTML/Javascrip
3. > Chọn 1 trong 6 code tương ứng với 6 style ở dưới và dán vào
4. > Save
#Code
- Style 1
<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/AVvXsEj-vgVgKyKtyVNl5r2ub05MPGW-hHV_PLEDZBTURFGmlAdZSj1iEv7kinljEbpqwPwEj301JAczexVLaCFk4UoJem97TKGAp8YL42wYtQpp93oZPV3RZkC7tBg8lkuLisvYRm5B6kId5wn9/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>
- Style 2
<style> #searchbox { width: 240px; } #searchbox input { outline: none; } input:focus::-webkit-input-placeholder { color: transparent; } input:focus:-moz-placeholder { color: transparent; } input:focus::-moz-placeholder { color: transparent; } #searchbox input[type="text"] { background: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-vgVgKyKtyVNl5r2ub05MPGW-hHV_PLEDZBTURFGmlAdZSj1iEv7kinljEbpqwPwEj301JAczexVLaCFk4UoJem97TKGAp8YL42wYtQpp93oZPV3RZkC7tBg8lkuLisvYRm5B6kId5wn9/s1600/search-dark.png) no-repeat 10px 13px #f2f2f2; border: 2px solid #f2f2f2; font: bold 12px Arial,Helvetica,Sans-serif; color: #6A6F75; width: 160px; padding: 14px 17px 12px 30px; -webkit-border-radius: 5px 0px 0px 5px; -moz-border-radius: 5px 0px 0px 5px; border-radius: 5px 0px 0px 5px; text-shadow: 0 2px 3px #fff; -webkit-transition: all 0.7s ease 0s; -moz-transition: all 0.7s ease 0s; -o-transition: all 0.7s ease 0s; transition: all 0.7s ease 0s; } #searchbox input[type="text"]:focus { background: #f7f7f7; border: 2px solid #f7f7f7; width: 200px; padding-left: 10px; } #button-submit{ background: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1Ov5rjlyM7b7aBgRu4_VsiplZhkbkSc5D__3tJfTkDWEXvXnQAZciQdjtHhbKPWzP-YdwPr6objS96vgNKPTv9ZqwKQCkJabmIYtsXxmn9Pl03C5IXEgCeYpP3RcJRap5ZOFMsuJu7ChM/s1600/slider-arrow-right.png) no-repeat; margin-left: -40px; border-width: 0px; width: 43px; height: 45px; } </style> <form id="searchbox" method="get" action="/search" autocomplete="off"> <input name="q" type="text" size="15" placeholder="Enter keywords here..." /> <input id="button-submit" type="submit" value=" "/> </form>
- Style 3
<style> #searchbox { background: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi-CUHywejVnnqbAYuIixVmIeHuGtbinz3HH3MxOyy3fCahyphenhyphenYdzfGoPi_sveiO8a1sdec8S2hilB9Bsqgw1-wHZ-zCziweyYtb2aFhhcJj8q6txL9LS0ObqO4vDaBCZ1VSyhptYeS_vfW2J/s1600/searchbar.png) no-repeat; width: 208px; height: 29px; } 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: transparent; margin: 3px 0px 0px 20px; padding: 5px 0px 5px 0px; border-width: 0px; font-family: "Arial Narrow", Arial, sans-serif; font-size: 12px; color: #828282; width: 70%; display: inline-table; vertical-align: top; } #button-submit { background: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_CvyR872EQ1GVCbKF033lo13Lkhyphenhyphen7OD2UsWSB16uIOdJPklDdL7Uhr4tg_-7NuepibqyfJVPw8K-_u1CF5irSphyphenhyphenbWtIjxLANoKCILLyKSFW6TiM6J9tEMY9FPfU0hC4c7x2TnL5c_4WK/s1600/magnifier.png) no-repeat; border-width: 0px; cursor: pointer; margin-left: 10px; margin-top: 4px; width: 21px; height: 22px; } #button-submit:hover { background: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhcJDsB47YqHZ_jf3nhDzLPHtOn8fcY2ehfZpyvrNIeWGrxYzkmAJqNNx1exbmJToebAKltRVPdnlwBXjvIpavgpN5bso1Gn8s378ZWzs6Y0kNYKhkWElN0d3L6a93w72t1Z4SAeqs72UnK/s1600/magnifier-hover.png) no-repeat; } #button-submit:active { background: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhcJDsB47YqHZ_jf3nhDzLPHtOn8fcY2ehfZpyvrNIeWGrxYzkmAJqNNx1exbmJToebAKltRVPdnlwBXjvIpavgpN5bso1Gn8s378ZWzs6Y0kNYKhkWElN0d3L6a93w72t1Z4SAeqs72UnK/s1600/magnifier-hover.png) no-repeat; outline: none; } #button-submit::-moz-focus-inner { border: 0; } </style> <form id="searchbox" method="get" action="/search" autocomplete="off"> <input name="q" type="text" size="15" placeholder="search..." /> <input id="button-submit" type="submit" value="" /> </form>
- Style 4
<style> #searchbox { background: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEguqAQVwacF3p_RvZxSprzYt4VaU_wuaIyfbUD8zSbtQbtZtpe2wpI7102BvjQ3PKlYySNd46YCeESMLvhmr2ezEKe_kGjNRJNO27XtzmMpO05SotTMa1gkosuEMNQORnTMb2DsMd7huEoB/s1600/search-box.png) no-repeat; height: 27px; width: 202px; } 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: transparent; margin: 0px 0px 0px 12px; padding: 5px 0px 5px 0px; border-width: 0px; font-family: "Arial Narrow", Arial, sans-serif; font-size: 12px; font-style: italic; width: 77%; color: #828282; display: inline-table; vertical-align: top; } #button-submit { background: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjMA0JNxhPq6x-VLUSvBYpYzhlfh5UCXgScmGB4lAthUzvl5ylJ9EKPzZNcg7lm-jRuMoVEQDwlXwNa2067BkaBANl71WpxWtSkDCycnGzvO8T8zkp-y2Sey_XvnsEJq-eWXNLwdqqk-rDX/s1600/search-button.png) no-repeat; border-width: 0px; cursor: pointer; width: 30px; height: 25px; } #button-submit:hover { background: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhc4zwvKZGWJ4SiOxwrlqxAO17QPfhAW9oP07bt8FTrM9ZDRKnBM5FuINp_Rkxi5Upr0xCf8u-a6IvNMdSWQt91crl3jOUUO5KvtRQSdS7JbUN2F7gVuoYFF_CqUBJYTv0ewj42Vwykd-Dh/s1600/search-button-hover.png) no-repeat; } #button-submit::-moz-focus-inner { border: 0; } </style> <form id="searchbox" method="get" action="/search" autocomplete="off"> <input name="q" type="text" size="15" placeholder="search..." /> <input id="button-submit" type="submit" value="" /> </form>
- Style 5
<style> #searchbox { background: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgusbnh8ee-EUQx7qk8vQD7Sbw_jWuwa3hpvRYJ5t7UnSM_IZUzPIFAAmnlQeCS5gn6lfo3ZQseDu_dSP8TJzVBzeOUtBtJkJBzkuUcqnivOAgbv0QdjdzsegDLDvHSwdz3Y6CTfm3u6UvD/s1600/search-box1.png) no-repeat; width: 250px; height: 65px; } 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: transparent; padding: 5px 0px 5px 20px; margin: 10px 15px 0px 0px; border-width: 0px; font-family: "Brush Script MT", cursive; font-size: 12px; color: #595959; width: 65%; font-weight: bold; display: inline-table; vertical-align: top; } #button-submit { background: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiIx0JnJhrccSSyft9xxbpRG-eb9kW0yjzeB1gedGXmsUVqnXgYoVLrZrS7EF7NpcYVrcQ0nfQXpiR1nGN02rdPoqIW-tqeG5b6_HegJdU0VMcAOEPgMnjt_OXPjZRtg-QbTEuwNglk2Hka/s1600/magnifier.png) no-repeat; border-width: 0px; cursor: pointer; margin-top: 10px; width: 19px; height: 25px; } #button-submit:hover { background: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj1hPgEmRu6BwIA0_bWPVmKXSLLpcDcOuLQV-eyehRBVhNv61IdKys5eS189CniwmJBJz4bFt-RndQb6tiy0Tn_wlQ_kdcEtxaNSN6VopM5N2XVU-eISA-stNqXqyHIzDcSuV8L3WQ1aO02/s1600/magnifier-hover.png) no-repeat; } #button-submit:active { background: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj1hPgEmRu6BwIA0_bWPVmKXSLLpcDcOuLQV-eyehRBVhNv61IdKys5eS189CniwmJBJz4bFt-RndQb6tiy0Tn_wlQ_kdcEtxaNSN6VopM5N2XVU-eISA-stNqXqyHIzDcSuV8L3WQ1aO02/s1600/magnifier-hover.png) no-repeat; outline: none; } #button-submit::-moz-focus-inner { border: 0; } </style> <form id="searchbox" method="get" action="/search" autocomplete="off"> <input class="textarea" name="q" type="text" size="15" placeholder="Search here..." /> <input id="button-submit" type="submit" value="" /> </form>
- Style 6
style> #searchbox { width: 280px; background: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi1ObQ2vkL1YhZywUgfr1jGvbrY5NBa5j407W8vXc-1ksh0EHnIxL39atj50zE8pKma1kIcOJI3ILGlFzoA4ASBr6cSaQPJvvcf_SStKyVROE_GB1C5Uto8HBNF2gmp_dQ6nL25hFSSLUe2/s1600/search-box.png) no-repeat; } #searchbox input { outline: none; } input:focus::-webkit-input-placeholder { color: transparent; } input:focus:-moz-placeholder { color: transparent; } input:focus::-moz-placeholder { color: transparent; } #searchbox input[type="text"] { background: transparent; border: 0px; font-family: "Avant Garde", Avantgarde, "Century Gothic", CenturyGothic, "AppleGothic", sans-serif; font-size: 14px; color: #f2f2f2 !important; padding: 10px 35px 10px 20px; width: 220px; } #searchbox input[type="text"]:focus { color: #fff; } #button-submit{ background: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgul4WPxWw137c8PdODtDaItUlceEKbQVdMLsPSS1v_t9vsHqZbBuqb0nuoXQR_MlxLerWwyIGLg66pwDsvbHwKnBrSwcsRh_WJ73jY3hKcjgn9e6oYC3JjBJbVZiNWr2-PRkYSzVIMANqh/s1600/search-icon.png) no-repeat; margin-left: -40px; border-width: 0px; width: 40px; height: 50px; } #button-submit:hover { background: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg9Qy9sXa5Tr92u4wz_deJdKDxwEC4gCGZVMAt-gw6cwQAKMu5Sd42Q8hJmd6yhJmKt64Ls8eOt_aKclT4ywyEyKhXopMWhzgCuDhBO72m7YJMWjFbVkBHtfIsorbl-PBnH0dEp5p7BHjZe/s1600/search-icon-hover.png); } </style> <form id="searchbox" method="get" action="/search" autocomplete="off"> <input name="q" type="text" size="15" placeholder="Enter keywords here..." /> <input id="button-submit" type="submit" value=" "/> </form>
Nguồn Heplogger
chào cả nhà, cảm ơn tác giả blog nhé. mình cùng nhau chia sẻ thông tin nhé.
ReplyDelete...........................
Can ho citi soho quan 2
Can ho quan 2
Căn hộ quận 2
chào cả nhà.mình cũng đang tìm hiểu về những thông tin trên
ReplyDelete.................................
Chung cu citi soho
Chung cư city soho
Căn hộ city soho quận 2
This comment has been removed by a blog administrator.
ReplyDeletebạn ơi làm sao để giới hạn số bài viết lại ak, em tìm 1 từ khóa mà nó ra dài quá ra hết tất cả các bài thì phải
ReplyDeleteMình chưa hiểu ý của bạn, liên hệ qua Facebook mình giúp cho
DeleteMình chưa hiểu ý của bạn, liên hệ qua Facebook mình giúp cho
Deletecho mình hỏi. mình lấy nguồn từ trang khác dạng html sau đó cho vào sửa mẫu cho blogger nhưng cứ báo lỗi không chỉnh lại được.
ReplyDelete