select样式美化 appearance:none;

因为很多页面要用到这个样式美化,所以后来在common.css样式加上标签样式,

select{

    appearance:none;

    -moz-appearance:none;

    -webkit-appearance:none;

    background: url(../img/arrselect.png) no-repeat scroll 90% center transparent;

}

select::-ms-expand { display: none; }

因为这个是标签css样式,那么在其他页面是通过外部配置引入公共样式的,其中一个页面想冲突掉这个select样式,怎么冲突掉上面这个样式,或者是用jquery移除掉。但是这个common.css类似于nodejs里面的ejs模板里面配置好的,每个页面都会有。所以尝试过用jquery寻找这个标签样式,但是找不到…… 想css冲突 也冲突不掉。目前想到唯一的解决办法是找到每个需要用到这个美化样式的页面,一个个去添加,但是还不太想采用这个方法。其中一个页面想用回默认的,需要默认的,咋整

12345678_0001
浏览 738回答 1
1回答

慕神8447489

select:not(.className){&nbsp; &nbsp; appearance:none;&nbsp; &nbsp; -moz-appearance:none;&nbsp; &nbsp; -webkit-appearance:none;&nbsp; &nbsp; background: url(../img/arrselect.png) no-repeat scroll 90% center transparent;}<select class="className"></select> <!-- 这里就是例外情况的select -->
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

JavaScript