本文介绍了如何在html中设置行之间的文本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 大家好, 我想在行之间设置文字。 它在中心看起来如下所示 ---------让我们开始------- --- 行应该是飞机而不是点缀。 i写的代码如下: Hi Everyone,i want to set the text between the line. it should looks like as follows in center --------- Lets begin ----------line should be plane not dotted.i wrote the code as follows:<table width="600" cellpadding="0" cellspacing="0" align="center" class="deviceWidth" bgcolor="" style="margin-top:1%"><tr><td align="left"><div style="height:2px; background-color: #8000FF; text-align: center"> <span style=" margin-right:-5%; margin-left:-5%; position: relative; top: -0.5em; color:blue; font-weight:bold;"><br> <p3> &nbsp; Lets begin &nbsp;</p3><br> </span></div></td></tr></table> 推荐答案 <div style="height:2px; background-color: #8000FF; text-align: center;"> <span style="position: relative; top: -0.5em; background-color: white; padding: 5px;">Lets begin</span></div> <hr> to draw solid lines wherever you wishstyle='position=relative; or, possibly even 'absolute;'top and left styles to position your text<div> to surround things so they can be positioned 您可以在此处查看这些项目的使用方式: http:// www.w3schools.com/html/default.asp [ ^ ] 学习自己定位(相关试验错误)对你来说是值得的。You can see how these items are used here: http://www.w3schools.com/html/default.asp[^]Learning to position this yourself (with associated trial an error) is worth it for you. <p class="lw">Let's Begin</p> .lw { font-size: 60px; }.lw span{ color: #f44;}.lw:before{ display: inline-block; content: ' '; height: 2px; width: 100px; background-color: #f44; margin-bottom: 20px;}.lw:after{ display: inline-block; content: ' '; height: 2px; width: 100px; background-color: #000; margin-bottom: 20px;} 请在此处查看我的答案: HTML HR LINE相关问题。 [ ^ ] 这正是你想要的:) -KR See my answer here:HTML HR LINE related issue.[^]This is exactly what you want :)-KR 这篇关于如何在html中设置行之间的文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!
10-30 05:49