Q:
手风琴效果插件,默认的样式是


这个效果,大大的图标,我使用background属性去修改改来改去没有效果。论坛牛人多,稍微点拨一下就够我研究半天了,本人不是很懂,麻烦写出详细的语句。
</style>
<script type="text/javascript" src="https://www.cnblogs.com/../Inetpub/wwwroot/jquery-1.6.2.min.js"></script>
<script type="text/javascript" src="http://www.cnblogs.com/../Inetpub/wwwroot/jquery-ui-1.8.16.custom.min.js"></script>
<script type="text/javascript">
$(function() {
$( "#accordion" ).accordion({
collapsible: true
});
});
</script>
A:
<h3><a href="#"><img src="images/1.png" />Section 1</a></h3>
只需要在<a></a>中添加图像的引用就可以了。<img src="images/1.png" />
NOTE: If you want multiple sections open at once, don't use an accordion
An accordion doesn't allow more than one content panel to be open at the same time, and it takes a lot of effort to do that. If you are looking for a widget that allows more than one content panel to be open, don't use this. Usually it can be written with a few lines of jQuery instead, something like this:
jQuery(document).ready(function(){
$('.accordion .head').click(function() {
$(this).next().toggle();
return false;
}).next().hide();
});Or animated:
jQuery(document).ready(function(){
$('.accordion .head').click(function() {
$(this).next().toggle('slow');
return false;
}).next().hide();
});
浙公网安备 33010602011771号