CSS——39. 文本修饰(文本属性)

HTML标签写法

html 复制代码
<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>
	<body>
		
		<ins>我爱学习</ins>
		<br />
		<br />
		<del>我爱学习</del>
	</body>
</html>

CSS写法
文本修饰就是为了设置下划线,上划线,删除线等等

html 复制代码
<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>文本修饰设置</title>
		<style type="text/css">
			p{
				/*text-decoration: underline;*/
				/*text-decoration: overline;*/
				/*text-decoration: line-through;*/
				text-decoration: blink;
			}
			
			
			
		</style>
	</head>
	<body>
		<!--文本修饰就是为了设置下划线,上划线,删除线等等-->
		<!--text-decoration: 值;-->
		<!--1.underline  定义下划线-->
		<!--2.overline  定义上划线-->
		<!--3.line-through  定义删除线-->
		<!--4.blink 闪烁的文字效果   当前所有浏览器都不支持,低版本的火狐浏览器支持。不建议使用.-->
		
		<!--重要:默认值  none  表示没有,用于取消a元素的下划线-->
		
		
		
		
		<p>我爱学习</p>
		
		<a href="#">我爱学习</a>
		
	</body>
</html>

text-decoration: none;
默认值 none 表示没有,用于取消a元素的下划线(如蓝色字体的 "我爱学习"链接下的下划线)


用他(text-decoration: none;)去下划线后 的链接

相关推荐
suedar3 分钟前
React 16 + TDesign Table 卡死问题深度复盘
前端
浩星40 分钟前
「Vue3 + Cesium 最佳实践」完整工程化方案
前端·javascript·vue.js
小李子呢02111 小时前
前端八股Vue(5)---v-if和v-show
前端·javascript·vue.js
yuki_uix1 小时前
跨域与安全:CORS、HTTPS 与浏览器安全机制
前端·面试
用户3153247795451 小时前
React19项目中 FormEdit / FormEditModal 组件封装设计说明
前端·react.js
陆枫Larry1 小时前
Git 合并冲突实战:`git pull` 失败与 `pull.ff=only` 的那些事
前端
江南月1 小时前
让智能体边想边做:从 0 理解 ReActAgent 的工作方式
前端·人工智能
袋鱼不重1 小时前
Hermes Agent 安装与实战:从安装到与 OpenClaw 全方位对比
前端·后端·ai编程
汉秋1 小时前
iOS 自定义 UICollectionView 拼图布局 + 布局切换动画实践
前端