我正在实现一个类似于结构的简单选项卡。当你点击标签时,它会打开一些内容。 问题是,当我点击第一个标签的第二个和第三个移动,理想情况下,他们不应该。 对于所有最新版本,我正在使用flex,因此问题仅限于IE9和IE10,不支持flexbox。 Internet Explorer 9和10的CSS问题
.tab {
background: #eee;
cursor: pointer;
padding: 10px 15px 10px 20px;
display: inline-block;
}
.tab-radio:checked + .tab {
background: #000000;
color: #ffffff;
}
.tab-radio {
display: none;
}
.tab-content {
display: none;
width: 100%;
}
.tab-radio:checked + label + .tab-content {
display: block;
}
<div class="accordion">
<!-- "For" should point to the input so that we can check the radio using the label. -->
<input id="1" class="tab-radio" name="tab-choice" type="radio"/>
<label class="tab" for="1">title 1</label>
<div class="tab-content">
<h4>Heading 1</h4>
Notice that we’ve renamed the variable product to products, and we’ve changed the type to Product[].
</div>
<input id="2" class="tab-radio" name="tab-choice" type="radio"/>
<label class="tab" for="2"> title 2 which is really long</label>
<div class="tab-content">
<h4>Heading 2</h4>
Now that we have our top-level application component, let’s write the ProductsList component,
</div>
<input id="3" class="tab-radio" name="tab-choice" type="radio"/>
<label class="tab" for="3">title 3</label>
<div class="tab-content">
<h4>Heading 3</h4>
Why is that wrong? Well, because in the case where your browser loads that template before Angular has run,
</div>
</div>
你能告诉如何是正常的CSS?对于其他版本 – SpaceDogCS
如果我添加其他CSS,你将不得不将浏览器切换到IE9看其效果:)这将是反效果不? –
不,不,我只想看看它应该如何像 – SpaceDogCS