小编Ico*_*ela的帖子

如何在不使用"!important"的情况下忽略继承的样式?

我不知道是否可能,但是有谁知道如何在不使用!important每个类的情况下忽略新类中所有继承的CSS样式?

我的HTML代码:

<div class="text">
   <h2>Title</h2>
   <span>Date</span>
   <p>Text here...</p>
   <div class="sub-text">
      <p>More text!</p>
      <span>Thanks!</span>
   </div>
</div>
Run Code Online (Sandbox Code Playgroud)

CSS:

.text {width:100%; float:left;}
.text h2 {font-size: 20px;}
.text span {font-size: 12px; font-style: italic;}
.text p {font-size: 12px;}

.sub-text {width: 100%; float: left;}
.sub-text p {I want to ignore all inherit class without use !important}
.sub-text span {I want to ignore all inherit class without use !important}
Run Code Online (Sandbox Code Playgroud)

html css

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

noUiSlider工具提示的日期格式

我正在尝试在我的项目中使用noUiSlider,但我无法在工具提示中应用日期格式.我只是在外面的divs.

看看这个JSFIDDLE.

noUiSlider.create(dateSlider, {
    behaviour: 'tap',
    connect: true,
    tooltips: [ true, true ],
    range: {
        min: timestamp('2016-06-01') + 24 * 60 * 60 * 1000,
        max: timestamp(date)
    },
    step: 1 * 24 * 60 * 60 * 1000,
    start: [timestamp(previousMonth), timestamp(date)]
});
Run Code Online (Sandbox Code Playgroud)

javascript nouislider

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

标签 统计

css ×1

html ×1

javascript ×1

nouislider ×1