小编use*_*707的帖子

如何仅将特定的CSS规则应用于Chrome?

有没有办法将以下CSS应用于div仅在Google Chrome中的特定内容?

position:relative;
top:-2px;
Run Code Online (Sandbox Code Playgroud)

css google-chrome css-hack

97
推荐指数
6
解决办法
23万
查看次数

如何在输入文本中隐藏闪烁的光标?

我想做一些看起来像选择输入的东西但实际上不是,这里是步骤.

我做了一个<input type="text">.

我添加了一个background-image,它会显示一个"选择箭头",给人的印象是它是一个选择框.

我在此输入中添加了一个默认值.

SlideDown()当我点击它时,会有一个隐藏的div 在这个输入下面.

我尝试了只读的东西,以便无法更改值,但闪烁的光标将显示出来.

如果我使用disabled,闪烁的光标将不会显示,但jQuery中的.click().focus函数将无法正常工作.下拉菜单不会SlideDown().

如何在不显示闪烁光标的情况下使其可点击?

这是代码

<div style="padding-top:17px; overflow:hidden;">
    <div style="float:left;">
        <label for="secretquestion">Secret Question</label><br>
        <input type="text" class="inputselect" id="secretquestion" name="secretquestion" value="Choose a Secret Question" tabindex=10 /><br>
        <div class="selectoptions" id="secretquestionoptions">
            <b>test</b>
        </div> 
    </div>
</div>
Run Code Online (Sandbox Code Playgroud)

CSS

.selectoptions
{
    display: none;
    background-color: white;  
    color: rgb(46,97,158); 
    width: 250px; 
    margin:auto; 
    border-style: solid; 
    border-width:1px; 
    border-color: rgb(46,97,158);  
    font-size: 14px; 
    text-align: center; 
}

.inputselect {
    color: white;  
    cursor: pointer;  
    background-image: url('inputselect.png'); …
Run Code Online (Sandbox Code Playgroud)

html javascript css jquery

26
推荐指数
4
解决办法
5万
查看次数

标签 统计

css ×2

css-hack ×1

google-chrome ×1

html ×1

javascript ×1

jquery ×1