CSS下划线动画
<template> <div class="home"> <h2 class="title"> <span> From the moment I saw you, my heart began to beat in a different rhythm. Your smile is like a ray of sunshine that warms my world and makes me forget all my worries. Your presence fills me with joy, and your absence leaves me longing for your return. You are my dream come true, and I cherish every moment we spend together. Your kindness, compassion, and wit are qualities that I admire deeply. You inspire me to be a better person, and I am grateful for the opportunity to grow with you. I want to be there for you, through the good times and the bad. I want to share your joys and sorrows, and support you in all your endeavors. My love for you is unwavering and true, and I hope that you can see the sincerity in my heart. In conclusion, I want to say that I love you with all my heart. You are my everything, and I cannot imagine my life without you. Please, be mine forever and let us embark on this journey of love together. </span> </h2> </div> </template> <script lang="ts"> import { defineComponent } from 'vue'; export default defineComponent({ name: 'HomeView', components: { }, }); </script> <style lang="scss" scoped> .title { color: #333; line-height: 2; span{ background: linear-gradient(to right, #732f2b,#146420) no-repeat right bottom; background-size: 0 2px; cursor: pointer; transition: background-size 1s; } span:hover{ background-position: left bottom; background-size: 100% 2px; } } </style>
本文来自博客园,作者:小珍珠在河里敲代码,转载请注明原文链接:https://www.cnblogs.com/Jansens520/p/18069989
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 地球OL攻略 —— 某应届生求职总结
· 周边上新:园子的第一款马克杯温暖上架
· Open-Sora 2.0 重磅开源!
· 提示词工程——AI应用必不可少的技术
· .NET周刊【3月第1期 2025-03-02】