我一直在寻找两个小时的答案。
.liteAccordion .slide > div {height: 100%; position: absolute; top: 0;
z-index: 10; overflow: hidden; background:
white;color:black;padding:25px;}
只有顶部和底部填充正在工作。问题的原因是什么?
我正在使用http://nicolahibbert.com/demo/liteAccordion/
中的js水平手风琴菜单插件HTML CODE
<div id="site-accordion">
<ol>
<li>
<h2><span>գլխավոր</span></h2>
<div class="ins">
<h3>This is Slide One.</h3>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore
magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
consequat. <a href="#">Link somewhere</a>
</p>
</div>
</li>
<li>
<h2><span>նսորություններ</span></h2>
<div>
<h3>This is Slide Two.</h3>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore
magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi. <br /><a href="#">Link somewhere</a>
</p>
</div>
</li>
<li>
<h2><span>ծառայություններ</span></h2>
<div>
<h3>This is Slide Three.</h3>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore
magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
consequat. <a href="#">Link somewhere</a>
</p>
</div>
</li>
<li>
<h2><span>կապ</span></h2>
<div>
<h3>This is Slide Four.</h3>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore
magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi. <br /><a href="#">Link somewhere</a>
</p>
</div>
</li>
<li>
<h2><span>խորհրդակցություն</span></h2>
<div>
<h3>This is Slide Five.</h3>
<p><Div class="cont">
<form id="site-contact-form" method="post" action="/index.php">
<div>
<div class="wrapper"><span>Ваше имя:</span>
<div class="bg">
<div>
<input type="text" class="input" name="contactname" id="contactname" value="" class="required"/s>
</div>
</div>
</div>
<div class="wrapper"><span>Ваш E-mail:</span>
<div class="bg">
<div>
<input type="text" class="input" name="email" id="email" value="" class="required"/>
</div>
</div>
</div>
<div class="textarea_box"><span>Ваш вопрос:</span>
<div class="bg">
<div>
<textarea cols="1" rows="1" name="message" id="message"></textarea>
</div>
</div>
</div>
<div style="clear:both;"></div>
<input type="submit" value="Отправить вопрос" name="submit" /> </div>
</form>
</p>
</div>
</li>
</ol>
</div>
</div>
这里一切正常。但我正在尝试添加一些填充,但它不起作用。
答案 0 :(得分:4)
插件在$('。slide')中覆盖$('div')的填充左边
尝试在.liteAccordion .slide > div
中添加子div并设置子div的填充。