css span靠右机关,span居右设置,span结构靠右
要让span如div一样靠右结构,通常应用浮动名堂float来完成。
靠右:
float:right
span靠右设置装备摆设代码:
span{float:right}
如许即让span靠右结构
span配置居右组织实例DIV CSS代码下列:
<!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>span靠右结构 CSS5</title> <style> .box{border:1px solid #000;padding:10px; width:300px;height:100px} .rt{float:right; border:1px solid #00F; width:100px;} </style> </head> <body> <div class="box"> <span class="rt">我这个SPAN是靠右组织的</span> </div> </body> </html>
如需转载,请注明文章出处和来源网址:http://www.divcss5.com/css-jiaocheng/tc51873.shtml