1
我使用jQuery此選項卡菜單,所有的工作,但是我想保持標籤標題圓角當內容DIV被關閉,但是當其他選項卡關閉選項卡標題仍然留有左下和右側直線邊緣: CSS標籤菜單從這個圖像保持圓角時關閉標籤
正如您所看到的,封閉的選項卡在底部仍有明顯的邊緣。有沒有一種方法是CSS,我可以設置圓角來關閉標籤時返回?
這裏是我當前的代碼:
$(document).ready(function()
{
$("#myaccountSettings").accordion(
{
heightStyle: "content"
});
});
#myaccountSettings h3
{
color: #a2a2a2;
background-color: #222222;
margin: 0;
margin-left: 3px;
margin-right: 3px;
padding: 8px;
border-radius: 4px 4px 0 0;
outline: none;
}
#myaccountSettings h3:hover
{
cursor: pointer;
color: #C33917;
}
#myaccountSettings h3:not(:first-child)
{
margin-top: 10px;
}
.accountTabContentWrapper
{
margin: 0;
margin-left: 3px;
margin-right: 3px;
padding: 8px;
background-color: #676464;
border-radius: 0 0 4px 4px;
color: #d6cbc9;
}
.accountTabContentWrapper h1
{
margin-top: 0;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
<div id="myaccountSettings">
<h3>General</h3>
<div class="accountTabContentWrapper">
<h1>Hello, @username</h1>
</div>
<h3>Email & Password</h3>
<div class="accountTabContentWrapper">
</div>
<h3>Delete My Account</h3>
<div class="accountTabContentWrapper">
</div>
<!--<h3>Section 3</h3>
<div class="accountTabContentWrapper">
</div>-->
</div>
,而不是'#myaccountSettings H3 {邊界半徑:4PX遞四方0 0; }'只需使用'border-radius:4px'?你在做什麼? –