html怎么在文字下面添波浪线?

html怎么在文字下面添波浪线?,第1张

需要准备的材料分别有:电脑、浏览器、html编辑器。

1、首先,打开html编辑器,新建html文件,例如:index.html。

2、在index.html中的<body>标签中,输入html代码:

div {background: radial-gradient(circle at 10px -7px, transparent 8px, currentColor 8px, currentColor 9px, transparent 9px) repeat-x,

radial-gradient(circle at 10px 27px, transparent 8px, currentColor 8px, currentColor 9px, transparent 9px) repeat-x

background-size: 20px 20pxbackground-position: -10px calc(100% + 16px), 0 calc(100% - 4px)}

3、浏览器运行index.html页面,此时在文字下方成功添加了波浪线。

我试了下楼主的问题 可以有结果 就是不知道合不合标准了。

出现红色的波浪线,估计是不合乎您当前使用的CSS版本的书写规范。

不过不推荐不要这样书写,

a行内元素 ,而div是块状元素 。

一般的书写规则是块里面可包含行内元素 ,

如果你想给a里面的文字添加其它的css属性 可以给里面的文字 加上em、span、strong进行修饰。

希望对您有帮助!


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

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

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

发表评论

登录后才能评论

评论列表(0条)

保存