V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
314x
V2EX  ›  问与答

关于wordpress的问题求助

  •  
  •   314x · Aug 14, 2013 · 2681 views
    This topic created in 4649 days ago, the information mentioned may be changed or developed.
    我用wordpress的主题搭建博客,在IE下浏览正常,但在chrome和firefox下顶部的搜索框默认都有search的字样,如何去掉呢?
    6 replies    1970-01-01 08:00:00 +08:00
    whuhacker
        1
    whuhacker  
       Aug 14, 2013
    目测应该是 placeholder,贴下搜索框的代码呗
    314x
        2
    314x  
    OP
       Aug 14, 2013
    CSS样式里面的代码

    #searchform button,#rss a,.icon {background-image:url(images/icon.png); background-repeat:no-repeat;}
    .aligncenter {display:block; margin-left:auto; margin-right:auto;}
    .alignleft {float:left; display:inline;}
    .alignright {float:right; display:inline;}
    .post .alignleft,.post .alignnone {margin:0.5em 0.5em 0 0;}
    .post .alignright {margin:0.5em 0 0 0.5em;}
    .post .aligncenter {margin:0.5em auto;}
    /*Header*/
    #header {background:#428c85 url(images/blue_bg.png) repeat; border-bottom:1px solid #005b97; box-shadow:0 1px 5px #003f68; width:100%; padding:5% 0; color:#90d5ff; text-shadow:1px 1px #005b97; z-index:1; position:relative;}
    #header_box {position:relative;}
    #header h1 {font-size:2em; margin-bottom:0.6em;}
    #header h1 a {color:#fff; text-decoration:none;}
    #header h2 {font-size:1em; font-weight:400; margin-bottom:0;}
    /*Toolbar*/
    #toolbar {height:24px; font-size:0.8em; position:absolute; right:0; bottom:0;}
    #searchform {border:1px solid ##326964; background-color:rgba(50,105,100,.6); border-radius:3px; box-shadow:inset 1px 1px 2px #00558d,0 1px 1px #0088da; padding:3px 5px; height:16px; float:right;}
    #searchform label {display:none;}
    #searchform input {color:#90d5ff; text-shadow:1px 1px #005b97; border:none; background:none; box-shadow:none; width:150px; height:16px; line-height:16px; vertical-align:top;}
    #searchform input:-moz-placeholder {color:#90d5ff;}
    #searchform input::-webkit-input-placeholder {color:#90d5ff;}
    #searchform button {background-position:-94px 2px; width:16px; height:16px; text-indent:-999px; vertical-align:top; border:none; cursor:pointer; margin-left:-5px; font-size:0;}
    #searchform button:hover {background-position:-142px -46px;}
    Keinez
        3
    Keinez  
       Aug 14, 2013   ❤️ 1
    这不关css的事情。定位到input标签,把placeholder清空就是。
    314x
        4
    314x  
    OP
       Aug 14, 2013
    @Keinez 赞,搞定了!
    why
        5
    why  
       Aug 14, 2013
    汗,这是IE不正常好不好
    cyr1l
        6
    cyr1l  
       Aug 14, 2013
    @why +1, 这是IE下不正常, Chrome 和 Firefox下正常才对。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   927 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 34ms · UTC 21:24 · PVG 05:24 · LAX 14:24 · JFK 17:24
    ♥ Do have faith in what you're doing.