大佬教程收集整理的这篇文章主要介绍了css – 并排对齐元素,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
但是,我想要这两个按钮并排。我不能真正弄清楚需要做什么对齐。
这里是HTML
<div id="dB"}> <a href="http://notareallink.com" title="Download" id="buyButton">Download</a> </div> <div id="gB"> <a href="#" title="Gallery" onclick="$j('#galleryDiv').toggle('slow');return false;" id="galleryButton">Gallery</a> </div>
这里是CSS
#buyButton { BACkground: url("assets/buy.png") 0 0 no-repeat; display:block; height:80px; width:232px; text-indent:-9999px; } #buyButton:hover{ width: 232px; height: 80px; BACkground-position: -232px 0; } #buyButton:active { width: 232px; height: 80px; BACkground-position: -464px 0; } #galleryButton { BACkground: url("images/galleryButton.png") 0 0 no-repeat; display:block; height:80px; width:230px; text-indent:-9999px; } #galleryButton:hover{ width: 230px; height: 80px; BACkground-position: -230px 0; } #galleryButton:active { width: 230px; height: 80px; BACkground-position: -460px 0; }
以上是大佬教程为你收集整理的css – 并排对齐元素全部内容,希望文章能够帮你解决css – 并排对齐元素所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。