Html 如何访问按钮文本中的第一个单词
这是我的密码Html 如何访问按钮文本中的第一个单词,html,css,button,underline,Html,Css,Button,Underline,这是我的密码 <button class="mcnTextContent" type="button" style="text-decoration:underline">Click here to Reactivate your account before Feb. 1, 2016 for FREE</button> 点击此处在2016年2月1日前免费重新激活您的帐户 我想让第一个单词(单击)只带下划线。有人能帮我弄清楚吗 谢谢您可以像这样将单词Click包装成
<button class="mcnTextContent" type="button" style="text-decoration:underline">Click here to Reactivate your account before Feb. 1, 2016 for FREE</button>
点击此处在2016年2月1日前免费重新激活您的帐户
我想让第一个单词(单击)只带下划线。有人能帮我弄清楚吗
谢谢您可以像这样将单词Click包装成一个样式
span
<button class="mcnTextContent" type="button"><span style="text-decoration:underline">Click</span> here to Reactivate your account before Feb. 1, 2016 for FREE</button>
HTML
<button class="mcnTextContent" type="button">
<span id="underline">Click</span> here to Reactivate your account beforeFeb. 1, 2016 for FREE
</button>
单击此处在2月之前重新激活您的帐户。2016年1月1日免费
单击此处免费在2016年2月1日前重新激活您的帐户
您能否详细说明为什么内嵌式样式不好。我正要推荐它。(行内含义是用右键环绕“单击”)行内样式是指标记的样式
属性。i、 e
,不建议这样做,因为这会增加您的HTML
代码长度,并且很难维护
<button class="mcnTextContent" type="button">
<span id="underline">Click</span> here to Reactivate your account beforeFeb. 1, 2016 for FREE
</button>
<button class="mcnTextContent" type="button" >
<span style="text-decoration:underline;">Click</span> here to Reactivate your account before Feb. 1, 2016 for FREE
</button>