html a标签中的文字怎么居中对齐<style type="text/css">.btn:hover{font-size:22px;}.btn{color:#000;background:#eaeaea}.a{text-decoration:none;font-size:20px;font-weight:bold;width:222px;height:100px;border:1px solid red}</

来源:学生作业帮助网 编辑:作业帮 时间:2024/05/02 00:31:41
html a标签中的文字怎么居中对齐<style type="text/css">.btn:hover{font-size:22px;}.btn{color:#000;background:#eaeaea}.a{text-decoration:none;font-size:20px;font-weight:bold;width:222px;height:100px;border:1px solid red}</
xUkOV+U&؎/!1 M}9.&vms+B ʸMbJ# JSV4BҴƗ_=[6M 2Y|yy/q PTgoYaFj5<_aظu-_9rCGMپYǞ}-aOSwd!ϼO3-0<--Aw2)ޢ= Y4Ϯ".M\,e*g9nEݶ6c߀0,EYK[Yγ-p.% ? %`cĵ?~VX}nS$qKK)hy58ms -QpBZ:]Aen>Lb]שc#xÀ9qO"ϓa:^VG&b{oq[ WÂ{xy袠*ƹ)aAJP]TJڅ2!4/*VuY^(`Q"ye: Q.rQUFR 8'JKcYS醹]==wQ0ԃf DiTYwmUq.uV|GgGbP=(B!' bxHUAѰB"EyaEE+yA) QTLLE$$4},ӡd3 u3$?-* j밷{{$ht^W穼_Z)\yV[f:C ӠNWVeAg57wQ871x_ [ak' tw B6aQz[ڻzK$rvwFyx8<V`| e 7W۸I lqu}j\2ǽz#df%>و*e#gۨe1>6NUZsq#Xh[6vek9/F{am7nKEKkyQ~)zjzͦpm oXAE

html a标签中的文字怎么居中对齐<style type="text/css">.btn:hover{font-size:22px;}.btn{color:#000;background:#eaeaea}.a{text-decoration:none;font-size:20px;font-weight:bold;width:222px;height:100px;border:1px solid red}</
html a标签中的文字怎么居中对齐
<style type="text/css">
.btn:hover{font-size:22px;}
.btn{color:#000;background:#eaeaea}
.a{text-decoration:none;font-size:20px;font-weight:bold;width:222px;height:100px;border:1px solid red}
</style>
<a href="javascript:void(0);" class="btn a"><span>系统系统统</span></a>
<a href="javascript:void(0);" class="btn a"><span>系统系统系统系统系统系统系统系统系统系统</span></a>

希望是这样的,因为是动态生成的,所以不能每个写死.

line-height 不行,我是要字在a标签的中间,行高太大两行的间距就太大了,第二行就是会出去!text-align也不行,虽然是居中了,但是不下来,vertical-align用了没什么反应.也没用过,不太熟悉,但是怎么试都不行.

html a标签中的文字怎么居中对齐<style type="text/css">.btn:hover{font-size:22px;}.btn{color:#000;background:#eaeaea}.a{text-decoration:none;font-size:20px;font-weight:bold;width:222px;height:100px;border:1px solid red}</
a标签外层加一个DIV 然后DIV 设置 样式 text-align:center; 这样里面就居中了,这是第一种思路,第二种思路的话,就直接在你的源码上改 .a{text-decoration:none;font-size:20px;font-weight:bold;width:222px;height:100px;border:1px solid red; display:block; text-align:center} 这个就行了,因为A标签不是一个块级元素 所以 要先 display:block
采纳我把.