0
我有一個html手風琴,實質上是一堆標籤與一些css 然後通過:目標僞類獲取樣式爲活動。 問題是,導致回發的任何服務器控件,然後我們丟失選定的部分。asp.net調用「目標」僞css類
我想嘗試添加一些東西,使我在服務器上運行,並注入類名稱,但我不知道如何告訴它的活動。 我也曾嘗試設置焦點
例如:
<div class="accordion vertical">
<section id="Section1">
<h2><a href="#Section1">LALALA LALa</a></h2>
<asp:Button ID="Button1" runat="server" Text="Button" />
</section>
<section id="Section2">
<h2><a href="#Section2">ZZZZZZZZZZZZZZZz</a></h2>
<p>Lorem Ipsum is simply dummy text of the printing and typesetting industry.</p>
</section>
</div>
CSS:
.accordion {
width:300px;
height:650px;
overflow:hidden;
color:#474747;
background:#fff;
padding:10px;
text-align: center;
}
.accordion section{
float:left;
overflow:hidden;
color:#333;
cursor:pointer;
margin:3px;
}
.accordion section:hover {
background:#ececec;
}
.accordion section p {
width: 92%;
display:none;
text-align: left;
}
.accordion section:after{
position:relative;
font-size:24px;
color:#000;
font-weight:bold;
}
.accordion section:nth-child(1):after{ content:'1'; }
.accordion section:nth-child(2):after{ content:'2'; }
.accordion section:nth-child(3):after{ content:'3'; }
.accordion section:nth-child(4):after{ content:'4'; }
.accordion section:nth-child(5):after{ content:'5'; }
.accordion section:target {
width: 92%;
background: #f3fbe5;
padding:10px;
}
.accordion section:target:hover {
background: #f3fbe5;
}
.accordion section:target h2 {
width:100%;
color:#fff;
}
.accordion section:target h2 a{
color:#333;
padding:0;
font-weight: 700;
}
.accordion section:target p {
width: 90%;
display:block;
}
.accordion section h2 a{
padding:15px 10px;
display:block;
font-size:16px;
font-weight:normal;
color:#000;
text-decoration:none;
font-family: MyraidProReg;
}
.vertical section{
width:100%;
height:40px;
-webkit-transition:height 0.2s ease-out;
-moz-transition:height 0.2s ease-out;
-o-transition:height 0.2s ease-out;
transition:height 0.2s ease-out;
}
/*Set height of the slide*/
.vertical :target{
height:250px;
width:97%;
}
.vertical section h2 {
position:relative;
}
/*Set position of the number on the slide*/
.vertical section:after{
top:-60px;
left:250px;
}
.vertical section:target:after{
left:-9999px;
}