相关疑难解决方法(0)

Internet Explorer中以粗体显示的样式选项

我有选择的样式问题.我需要一些选项以粗体显示,但Internet Explorer不想渲染它.

我正在使用CSS设置它:

font-weight: bold;
Run Code Online (Sandbox Code Playgroud)

哪个不行.在此页面中可以看到一个示例:

它在Firefox中显示粗体字体,但在Internet Explorer中不显示.

我尝试过Internet Explorer 7和8.

有人有替代品吗?

编辑:一个样本:

HTML:

<select>
    <option class="special">Special</option>
</select>
Run Code Online (Sandbox Code Playgroud)

CSS:

.special {
    font-weight: bold;
}
Run Code Online (Sandbox Code Playgroud)

css internet-explorer options

14
推荐指数
2
解决办法
2万
查看次数

.css文件,::第一行不可能.怎么实现这个?Ubuntu 18.04

Ubuntu 18.04

我正在自定义面板,这是.css文件中的内容
我已经添加了::first-line部分到cusomize第一行,如下图所示.但重启后不会应用它.

.css文件的内容:

#panel .clock-display {
    color: blue; }

#panel .clock-display::first-line {
    color: green; }
Run Code Online (Sandbox Code Playgroud)

.js文件的内容:

var DateMenuButton = new Lang.Class({
    Name: 'DateMenuButton',
    Extends: PanelMenu.Button,

    _init() {
        let item;
        let hbox;
        let vbox;

        let menuAlignment = 0.5;
        if (Clutter.get_default_text_direction() == Clutter.TextDirection.RTL)
            menuAlignment = 1.0 - menuAlignment;
        this.parent(menuAlignment);

        this._clockDisplay = new St.Label({ y_align: Clutter.ActorAlign.CENTER });
        this._indicator = new MessagesIndicator();

        let box = new St.BoxLayout();
        box.add_actor(new IndicatorPad(this._indicator.actor));
        box.add_actor(this._clockDisplay);
        box.add_actor(this._indicator.actor);

        this.actor.label_actor = this._clockDisplay;
        this.actor.add_actor(box);
        this.actor.add_style_class_name ('clock-display');
Run Code Online (Sandbox Code Playgroud)

在最后一行,this.actor.add_style_calss_name ('clock-display'); …

javascript css ubuntu

9
推荐指数
1
解决办法
313
查看次数

更改Duallistbox中单击的选项的背景颜色

我正在使用bootstrap-duallistbox

当前,当用户从任一框中单击一个选项时,该选项的背景变为蓝色一秒钟,然后该选项移动到另一个选择框。

在此处输入图片说明

我想将颜色从蓝色更改为其他颜色。

这到底是什么状态?CSS应用option:activeoption:hoveroption:focus不干活,就选择此状态,并改变颜色。

我以为这可能有用,但也失败了。

select:-internal-list-box option:checked {
    color: #333 !important;
    background-color: #FFC894 !important;
}
Run Code Online (Sandbox Code Playgroud)

也没有:

select:-internal-list-box option:selected  {
    color: #333 !important;
    background-color: #FFC894 !important;
}

select:-internal-list-box:focus  option:checked  {
    color: #333 !important;
    background-color: #FFC894 !important;
}

select:-internal-list-box:focus  option:selected  {
    color: #333 !important;
    background-color: #FFC894 !important;
}

select:-internal-list-box:focus option::selection  {
    color: #333 !important;
    background-color: #FFC894 !important;
}

.bootstrap-duallistbox-container:focus select option::selection {
    background: #ffb7b7 !important;
}
Run Code Online (Sandbox Code Playgroud)

单击选项时如何更改显示的背景颜色?

这是一个显示问题的jsFiddle

html css twitter-bootstrap drop-down-menu

6
推荐指数
1
解决办法
6825
查看次数

如何在选择选项中更改选择的颜色?

我正在尝试在选择选项中更改选择的颜色.我试图这样做:

option::selection {background: #ccc;}
option::-moz-selection {background: #ccc;}
option::-webkit-selection {background: #ccc; color:#fff;}
Run Code Online (Sandbox Code Playgroud)

但它不起作用.这仅适用于简单文本,不适用于选项.有没有办法改变选择的颜色?我不需要改变所选选项的背景.我需要改变选择的颜色.谢谢.

css selection option

5
推荐指数
1
解决办法
2万
查看次数

jQuery如何设置/取消设置下拉菜单的背景颜色

该脚本需要jQuery

一切正常但我需要能够在选项框选择时将所选下拉列表的颜色更改为(亮绿色).如果选择了其他选项,则会再次显示灰色.

我已经尝试了我读到的所有建议的提示,即$("#mOptions").prop(.css('background-color','#ffffff')); 任何颜色.请帮助,非常感谢.不工作

剧本

$(document).ready(function(){
    $('input[name="gender"]').click(function() {
       if($('input[name="gender"]').is(':checked')) { 
           var radioValue = $("input[name='gender']:checked").val();
            if(radioValue == "m"){
               $( "#mOptions" ).prop( "disabled", false );
               $( "#fOptions" ).prop( "disabled", true );
            } else {
                $( "#mOptions" ).prop( "disabled", true );
               $( "#fOptions" ).prop( "disabled", false );
            }
       }
    });
});
Run Code Online (Sandbox Code Playgroud)

表格:

<input type="radio" name="gender" value="m" />Male
<input type="radio" name="gender" value="f" />Female
<br />
<select id="mOptions" disabled="true">
    <option>Select</option>
    <option value="1">Shirt</option>
    <option value="2">Pant</option>
    <option value="3">dhoti</option>
</select>

<select id="fOptions" disabled="true">
    <option>Select</option>
    <option value="4">Saree</option>
    <option value="5">Bangle</option> …
Run Code Online (Sandbox Code Playgroud)

javascript jquery colors drop-down-menu

2
推荐指数
1
解决办法
4550
查看次数