摘要:名為的框搜索框添加背景圖片
/#keyword/
id名為keyword的input框(搜索框)添加背景圖片
#keyword::-webkit-input-placeholder { color: transparent; text-indent: -9999px; background: transparent url(../img/google_custom_search_watermark.gif) no-repeat 10% center; } #keyword::-moz-placeholder { /* Firefox 19+ */ color: transparent; text-indent: -9999px; background: #fff url(../img/google_custom_search_watermark.gif) no-repeat 10% center; } #keyword:-moz-placeholder { /* Firefox 18- */ color: transparent; text-indent: -9999px; background: transparent url(../img/google_custom_search_watermark.gif) no-repeat 10% center; } #keyword:-ms-input-placeholder { /* IE 10- */ color: transparent; text-indent: -9999px; background: transparent url(../img/google_custom_search_watermark.gif) no-repeat 10% center; }
文章版權(quán)歸作者所有,未經(jīng)允許請勿轉(zhuǎn)載,若此文章存在違規(guī)行為,您可以聯(lián)系管理員刪除。
轉(zhuǎn)載請注明本文地址:http://systransis.cn/yun/117263.html
摘要:方法一效果預(yù)覽思路是,首先判斷瀏覽器是否支持屬性,如果不支持的話,就遍歷所有輸入框,獲取屬性的值填充進(jìn)輸入框作為提示信息,同時字體設(shè)置成灰色。 placeholder是HTML5的屬性之一,在不同的瀏覽器( 支持HTML5的現(xiàn)代瀏覽器 )中會有略微不同的顯示效果: 在Chrome( v31.0.1650.63 m)、Firefox( v21.0 )、360安全( v6.3 極速模式 )...
摘要:目標(biāo)中間一段空白把導(dǎo)航欄分為左右兩個部分在導(dǎo)航欄上加上一個搜索框,但不被的樣式污染。 前置 本文需要對CSS,Vue,ElementUI有基本的了解。 本文以ElementUI提供的導(dǎo)航菜單組件為基礎(chǔ)。 本文希望能在此組件基礎(chǔ)上實現(xiàn)以下內(nèi)容: 中間一段空白把導(dǎo)航欄分為左右兩個部分 在導(dǎo)航欄上加上一個搜索框,但不被 el-menu-item 的樣式污染。 先研究清楚ElementUI...
閱讀 2864·2023-04-25 18:46
閱讀 726·2021-11-19 09:40
閱讀 2097·2021-09-28 09:36
閱讀 3430·2021-09-10 11:11
閱讀 3492·2019-08-30 15:55
閱讀 1828·2019-08-30 15:54
閱讀 2621·2019-08-29 16:16
閱讀 3562·2019-08-29 15:08