css 实现鼠标上移添加下划线

效果图

实现代码

javascript 复制代码
<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    .title {
      color: #333;
    }

    .title span {
      background: linear-gradient(to right, #999, #999) no-repeat right bottom;
      background-size: 0 2px;
      transition: background-size 1000ms;
    }

    .title span:hover {
      background-position-x: left;
      background-size: 100% 2px;
    }
  </style>
</head>

<body>
  <h2 class="title">
    <span>
      Migrating From MySQL to YugabyteDB Using YugabyteDB VoyagerMigrating From MySQL to YugabyteDB Using</span>
  </h2>
</body>

</html>
相关推荐
小小竹子1 分钟前
前端vue-实现富文本组件
前端·vue.js·富文本
小白小白从不日白10 分钟前
react hooks--useReducer
前端·javascript·react.js
下雪天的夏风23 分钟前
TS - tsconfig.json 和 tsconfig.node.json 的关系,如何在TS 中使用 JS 不报错
前端·javascript·typescript
diygwcom34 分钟前
electron-updater实现electron全量版本更新
前端·javascript·electron
Hello-Mr.Wang1 小时前
vue3中开发引导页的方法
开发语言·前端·javascript
程序员凡尘1 小时前
完美解决 Array 方法 (map/filter/reduce) 不按预期工作 的正确解决方法,亲测有效!!!
前端·javascript·vue.js
编程零零七5 小时前
Python数据分析工具(三):pymssql的用法
开发语言·前端·数据库·python·oracle·数据分析·pymssql
(⊙o⊙)~哦7 小时前
JavaScript substring() 方法
前端
无心使然云中漫步7 小时前
GIS OGC之WMTS地图服务,通过Capabilities XML描述文档,获取matrixIds,origin,计算resolutions
前端·javascript
Bug缔造者7 小时前
Element-ui el-table 全局表格排序
前端·javascript·vue.js