html文字分别居左居中居右

html文字分别居左居中居右,第1张

<div class="text clearfix" style="text-align:center">

2.<span style="float:right">居右</span><span style="float:left">居左</span>居中

</div>

<table width="" border="0" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC">

<tr>

<td bgcolor="#FFFFFF" align="left">居左</td>

<td bgcolor="#FFFFFF" align="center">居中</td>

<td bgcolor="#FFFFFF" align="right">居右</td>

</tr>

</table>

<div id="top"></div>

<div id="box">

<div id="left"></div>

<div id="center"></div>

<div id="right"></div>

</div>

css规则

#top{

width:1000pxheight:150pxmargin:0 auto

}

#box{

width:1000pxheight:500pxmargin:0 auto

}

#left{

width:240pxheight:500pxfloat:left

}

#right{

width:240pxheight:500pxfloat:right

}

#center{

width:520pxheight:500pxfloat:left

}


欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/zaji/6164263.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-03-16
下一篇 2023-03-16

发表评论

登录后才能评论

评论列表(0条)

保存