国产 无码 综合区,色欲AV无码国产永久播放,无码天堂亚洲国产AV,国产日韩欧美女同一区二区

不需要任何插件,純 CSS 就能打造炫酷文字特效

這篇具有很好參考價值的文章主要介紹了不需要任何插件,純 CSS 就能打造炫酷文字特效。希望對大家有所幫助。如果存在錯誤或未考慮完全的地方,請大家不吝賜教,您也可以點(diǎn)擊"舉報違法"按鈕提交疑問。

前言

現(xiàn)如今網(wǎng)頁越來越趨近于動畫,相信大家平時瀏覽網(wǎng)頁或多或少都能看到一些動畫效果,今天我們來做一些文字上面的動畫效果,下面一起看看吧。


1. 文字抖動

實(shí)現(xiàn)效果

不需要任何插件,純 CSS 就能打造炫酷文字特效


實(shí)現(xiàn)思路

其實(shí)主要就是通過 animation 添加動畫屬性,利用 keyframes 來描述動畫的開始、過程和結(jié)束的狀態(tài),核心就是 animation + transform:rotate,話不多說,下面直接看代碼。


完整源碼

<template>
  <div class="parentBox">
    <div class="contantBox">文字抖動</div>
  </div>
</template>
<style lang="less" scoped>
.parentBox {
  height: 100%;
  background: rgb(31, 31, 31);
  padding: 100px;
  @keyframes cartoon {
    2% {
      transform: translate(6px, -2px) rotate(3.5deg);
    }

    4% {
      transform: translate(5px, 8px) rotate(-0.5deg);
    }

    6% {
      transform: translate(6px, -3px) rotate(-2.5deg);
    }

    8% {
      transform: translate(4px, -2px) rotate(1.5deg);
    }

    10% {
      transform: translate(-6px, 8px) rotate(-1.5deg);
    }

    12% {
      transform: translate(-5px, 5px) rotate(1.5deg);
    }

    14% {
      transform: translate(4px, 10px) rotate(3.5deg);
    }

    16% {
      transform: translate(0px, 4px) rotate(1.5deg);
    }

    18% {
      transform: translate(-1px, -6px) rotate(-0.5deg);
    }

    20% {
      transform: translate(6px, -9px) rotate(2.5deg);
    }

    22% {
      transform: translate(1px, -5px) rotate(-1.5deg);
    }

    24% {
      transform: translate(-9px, 6px) rotate(-0.5deg);
    }

    26% {
      transform: translate(8px, -2px) rotate(-1.5deg);
    }

    28% {
      transform: translate(2px, -3px) rotate(-2.5deg);
    }

    30% {
      transform: translate(9px, -7px) rotate(-0.5deg);
    }

    32% {
      transform: translate(8px, -6px) rotate(-2.5deg);
    }

    34% {
      transform: translate(-5px, 1px) rotate(3.5deg);
    }

    36% {
      transform: translate(0px, -5px) rotate(2.5deg);
    }

    38% {
      transform: translate(2px, 7px) rotate(-1.5deg);
    }

    40% {
      transform: translate(6px, 3px) rotate(-1.5deg);
    }

    42% {
      transform: translate(1px, -5px) rotate(-1.5deg);
    }

    44% {
      transform: translate(10px, -4px) rotate(-0.5deg);
    }

    46% {
      transform: translate(-2px, 2px) rotate(3.5deg);
    }

    48% {
      transform: translate(3px, 4px) rotate(-0.5deg);
    }

    50% {
      transform: translate(8px, 1px) rotate(-1.5deg);
    }

    52% {
      transform: translate(7px, 4px) rotate(-1.5deg);
    }

    54% {
      transform: translate(10px, 8px) rotate(-1.5deg);
    }

    56% {
      transform: translate(-3px, 0px) rotate(-0.5deg);
    }

    58% {
      transform: translate(0px, -1px) rotate(1.5deg);
    }

    60% {
      transform: translate(6px, 9px) rotate(-1.5deg);
    }

    62% {
      transform: translate(-9px, 8px) rotate(0.5deg);
    }

    64% {
      transform: translate(-6px, 10px) rotate(0.5deg);
    }

    66% {
      transform: translate(7px, 0px) rotate(0.5deg);
    }

    68% {
      transform: translate(3px, 8px) rotate(-0.5deg);
    }

    70% {
      transform: translate(-2px, -9px) rotate(1.5deg);
    }

    72% {
      transform: translate(-6px, 2px) rotate(1.5deg);
    }

    74% {
      transform: translate(-2px, 10px) rotate(-1.5deg);
    }

    76% {
      transform: translate(2px, 8px) rotate(2.5deg);
    }

    78% {
      transform: translate(6px, -2px) rotate(-0.5deg);
    }

    80% {
      transform: translate(6px, 8px) rotate(0.5deg);
    }

    82% {
      transform: translate(10px, 9px) rotate(3.5deg);
    }

    84% {
      transform: translate(-3px, -1px) rotate(3.5deg);
    }

    86% {
      transform: translate(1px, 8px) rotate(-2.5deg);
    }

    88% {
      transform: translate(-5px, -9px) rotate(2.5deg);
    }

    90% {
      transform: translate(2px, 8px) rotate(0.5deg);
    }

    92% {
      transform: translate(0px, -1px) rotate(1.5deg);
    }

    94% {
      transform: translate(-8px, -1px) rotate(0.5deg);
    }

    96% {
      transform: translate(-3px, 8px) rotate(-1.5deg);
    }

    98% {
      transform: translate(4px, 8px) rotate(0.5deg);
    }

    0%,
    100% {
      transform: translate(0, 0) rotate(0);
    }
  }
  .contantBox {
    color: #fff;
    animation: cartoon 5s infinite ease-in-out;
  }
}
</style>

2. 文字縮放

實(shí)現(xiàn)效果

不需要任何插件,純 CSS 就能打造炫酷文字特效


實(shí)現(xiàn)思路

實(shí)現(xiàn)的思路核心在于 scale3d 屬性讓其變形,配合 animation-timing-function 屬性指定動畫完成的周期實(shí)現(xiàn)該效果。


完整源碼

<template>
  <div class="parentBox">
    <div class="contantBox">文字縮放</div>
  </div>
</template>
<style lang="less" scoped>
.parentBox {
  height: 100%;
  background: rgb(31, 31, 31);
  padding: 100px;
  @keyframes zoomMeans {
    40% {
      opacity: 1;
      transform: scale3d(0.475, 0.475, 0.475) translate3d(0, -60px, 0);
      animation-timing-function: cubic-bezier(0.55, 0.055, 0.675, 0.19);
    }

    to {
      opacity: 0;
      transform: scale3d(0.1, 0.1, 0.1) translate3d(0, 2000px, 0);
      animation-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1);
    }
  }
  .contantBox {
    animation: 2s linear 0s infinite alternate zoomMeans;
    font-weight: bold;
    color: white;
    font-size: 20px;
    text-align: center;
  }
}
</style>

3. 文字鼠標(biāo)懸浮

實(shí)現(xiàn)效果

不需要任何插件,純 CSS 就能打造炫酷文字特效


實(shí)現(xiàn)思路

上圖的效果實(shí)現(xiàn)起來其實(shí)就非常的簡單了,我們只需要通過 hover 事件在鼠標(biāo)觸摸文字時設(shè)置其樣式和效果即可。


完整源碼

<template>
  <div class="parentBox">
    <h1>hello word!(鼠標(biāo)懸浮特效)</h1>
  </div>
</template>
<style lang="less" scoped>
.parentBox {
  height: 100%;
  background: rgb(31, 31, 31);
  padding: 100px;
  h1 {
    display: inline-block;
    color: white;
    font-size: 56px;
    transition: 0.5s;
    cursor: pointer;
  }

  h1:hover {
    text-shadow: 0 1px 0 #ccc, 0 2px 0 #ccc, 0 3px 0 #ccc, 0 4px 0 #ccc,
      0 5px 0 #ccc, 0 6px 0 #ccc, 0 7px 0 #ccc, 0 8px 0 #ccc, 0 9px 0 #ccc,
      0 10px 0 #ccc, 0 11px 0 #ccc, 0 12px 0 #ccc,
      0 20px 30px rgba(0, 0, 0, 0.5);
  }
}
</style>

當(dāng)然你還可以如下圖這樣?

不需要任何插件,純 CSS 就能打造炫酷文字特效


完整源碼

<template>
  <div class="parentBox">
    <h1>hello word!(鼠標(biāo)懸浮特效)</h1>
  </div>
</template>
<style lang="less" scoped>
.parentBox {
  height: 100%;
  background: rgb(31, 31, 31);
  padding: 100px;
  h1 {
    display: inline-block;
    color: #fff;
    cursor: pointer;
    -webkit-box-reflect: below 0 -webkit-linear-gradient(transparent, transparent
          50%, rgba(255, 255, 255, 0.3));
    font: bold 50px/1.231 georgia, sans-serif;
    text-transform: uppercase;
  }
}
</style>

4. 文字動畫下劃線

實(shí)現(xiàn)效果

不需要任何插件,純 CSS 就能打造炫酷文字特效

完整源碼

<template>
  <div>
    <h2 class="titleBox">
      <span>People who have no culture are not sad. Taste miss not often meet.</span>
    </h2>
  </div>
</template>
<style scoped>
.titleBox span {
  line-height: 1.5;
  padding-bottom: 4px;
  background: linear-gradient(to right, rgb(255, 64, 96), rgb(47, 216, 47))
    no-repeat right bottom;
  background-size: 0px 3px;
  transition: background-size 1200ms;
}
.titleBox span:hover {
  background-position-x: left;
  background-size: 100% 3px;
}
</style>

5. 文字穿透效果

實(shí)現(xiàn)效果

不需要任何插件,純 CSS 就能打造炫酷文字特效

完整源碼

<template>
  <div>
    <div class="box">
      <h1>Hello word</h1>
    </div>
  </div>
</template>

<style scoped>
.box {
  background: rgba(0, 0, 0.7);
  width: 100%;
  height: 100%;
}

h1 {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 10vw;
  text-stroke: 1px #fff;
  -webkit-text-stroke: 1px #fff;
  background: url("../../img/1.png")
    no-repeat center/cover;
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
}
</style>

6. 文字交融效果

實(shí)現(xiàn)效果

不需要任何插件,純 CSS 就能打造炫酷文字特效

完整源碼

<template>
  <div>
    <span>Hello word</span>
  </div>
</template>

<style scoped>
div {
  text-align: center;
  background: #000;
  filter: contrast(30);
}
span {
  font-size: 100px;
  color: #fff;
  animation: shadow 3s forwards;
}
@keyframes shadow {
  from {
    letter-spacing: -50px;
    filter: blur(10px);
  }
  to {
    letter-spacing: 10px;
    filter: blur(2px);
  }
}
</style>

持續(xù)更新中...文章來源地址http://www.zghlxwxcb.cn/news/detail-429269.html

到了這里,關(guān)于不需要任何插件,純 CSS 就能打造炫酷文字特效的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!

本文來自互聯(lián)網(wǎng)用戶投稿,該文觀點(diǎn)僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務(wù),不擁有所有權(quán),不承擔(dān)相關(guān)法律責(zé)任。如若轉(zhuǎn)載,請注明出處: 如若內(nèi)容造成侵權(quán)/違法違規(guī)/事實(shí)不符,請點(diǎn)擊違法舉報進(jìn)行投訴反饋,一經(jīng)查實(shí),立即刪除!

領(lǐng)支付寶紅包贊助服務(wù)器費(fèi)用

相關(guān)文章

  • uniapp 前端實(shí)現(xiàn)文字識別,身份證識別,營業(yè)執(zhí)照識別 (兼容APP、H5、小程序 不需要任何SDK)

    本文將介紹如何使用uniapp和百度AI開放平臺的OCR(光學(xué)字符識別)API實(shí)現(xiàn)身份證、營業(yè)執(zhí)照等卡證的識別和文字識別功能。 APP 小程序 H5 √ √ √ 1. 注冊百度賬號 前往百度AI開放平臺官網(wǎng),點(diǎn)擊“登錄”。使用百度賬號登錄,如果沒有可以先注冊百度賬號。 登錄成功后,點(diǎn)擊右上角

    2024年02月10日
    瀏覽(18)
  • 五款拿來就能用的炫酷表白代碼

    五款拿來就能用的炫酷表白代碼

    「作者主頁」: 士別三日wyx 「作者簡介」: CSDN top100、阿里云博客專家、華為云享專家、網(wǎng)絡(luò)安全領(lǐng)域優(yōu)質(zhì)創(chuàng)作者 「推薦專欄」: 小白零基礎(chǔ)《Python入門到精通》 Python彈窗表白代碼,根據(jù)電腦性能設(shè)置彈窗個數(shù),效果圖如下: 完整代碼如下,不用導(dǎo)入模塊,復(fù)制就能用

    2024年02月12日
    瀏覽(25)
  • 十幾款拿來就能用的炫酷表白代碼

    十幾款拿來就能用的炫酷表白代碼

    「作者主頁」: 士別三日wyx 「作者簡介」: CSDN top100、阿里云博客專家、華為云享專家、網(wǎng)絡(luò)安全領(lǐng)域優(yōu)質(zhì)創(chuàng)作者 「推薦專欄」: 小白零基礎(chǔ)《Python入門到精通》 復(fù)制到文本文件,后綴名改成 vbs 就能運(yùn)行,效果如下。 完整代碼如下,復(fù)制就能用 為了防止有些小伙伴關(guān)機(jī)

    2024年02月11日
    瀏覽(25)
  • 五個拿來就能用的炫酷登錄頁面

    五個拿來就能用的炫酷登錄頁面

    ------------- 寫在前面 ------------- 上次的博文十個拿來就能用的網(wǎng)頁炫酷特效?,得到了大家的支持!這次我將收藏了很久的炫酷登錄頁面分享給大家,如果覺得有幫助可以 點(diǎn)贊收藏 支持一下,能 關(guān)注 一下就再好不過了o(≧▽≦*)o,之后還會分享更多干貨內(nèi)容,謝謝大家啦!

    2024年02月12日
    瀏覽(28)
  • ThreeJS 炫酷特效旋轉(zhuǎn)多面體Web頁 Demo 01《ThreeJS 炫酷特效制作》

    ThreeJS 炫酷特效旋轉(zhuǎn)多面體Web頁 Demo 01《ThreeJS 炫酷特效制作》

    本案例為一個 threejs 的特效網(wǎng)頁,大小球體進(jìn)行包裹,外球體為透明材質(zhì),但是進(jìn)行了線框渲染,使其能夠通過外球踢查看其內(nèi)球體。 注:案例參考源于互聯(lián)網(wǎng),在此做代碼解釋,侵刪 本案例除 ThreeJS 外不適用任何第三方框架,放心食用 懶的同學(xué)可以直接下載代碼,打賞作

    2024年02月08日
    瀏覽(21)
  • 網(wǎng)頁炫酷特效拿來即可用(看板娘&鼠標(biāo)點(diǎn)擊&炫酷登錄頁面&櫻花特效&生日祝福&彩虹屁)

    網(wǎng)頁炫酷特效拿來即可用(看板娘&鼠標(biāo)點(diǎn)擊&炫酷登錄頁面&櫻花特效&生日祝福&彩虹屁)

    作為一個樂于分享知識的程序員來說,博客必不可少。 在制作博客的過程中,改前端改得讓人不言而喻?? 其次,為了大伙們不步我后塵,給大家陸續(xù)分享出來,如果覺得有幫助可以 點(diǎn)贊收藏 支持一下,如果能 關(guān)注 一下就再好不過了ヾ(≧▽≦*)o,之后還會分享許多內(nèi)容,

    2024年02月09日
    瀏覽(29)
  • python炫酷特效代碼簡單,python制作的炫酷動畫

    python炫酷特效代碼簡單,python制作的炫酷動畫

    本篇文章給大家談?wù)刾ython炫酷特效代碼簡單,以及python好看的圖案代碼,希望對各位有所幫助,不要忘了收藏本站喔。 可以生成下面這種圖 import random import turtle def random_color(): ? ? rgbl=[255,0,0] ? ? random.shuffle(rgbl) ? ? return tuple(rgbl) def koch(size,n): ? ? if n==0: ? ? ? ? (size) ?

    2024年02月07日
    瀏覽(20)
  • vscode超炫酷的編碼特效詳解

    vscode超炫酷的編碼特效詳解

    1.在擴(kuò)展中搜索 ????????插件:Power Mode? ? 2.在設(shè)置里搜索Code Actions On Save ? 3.點(diǎn)擊在settings.json中編輯 ?

    2024年02月12日
    瀏覽(29)
  • 炫酷的花式滑塊滑動無縫切換特效

    ?? 個人網(wǎng)站:【 海擁】【小霸王游戲機(jī)】【大轉(zhuǎn)盤】 ?? 風(fēng)趣幽默的前端學(xué)習(xí)課程:??28個案例趣學(xué)前端 ?? 想尋找共同學(xué)習(xí)交流、摸魚劃水的小伙伴,請點(diǎn)擊【摸魚學(xué)習(xí)群】【學(xué)習(xí)文檔】 ?? 免費(fèi)且實(shí)用的計算機(jī)相關(guān)知識題庫:??進(jìn)來逛逛 給大家安利一個免費(fèi)且實(shí)用的前

    2024年02月21日
    瀏覽(56)
  • 國慶發(fā)生的那些事兒------編寫了炫酷的HTML動態(tài)鼠標(biāo)特效,超級炫酷酷酷!

    國慶發(fā)生的那些事兒------編寫了炫酷的HTML動態(tài)鼠標(biāo)特效,超級炫酷酷酷!

    國慶假期的歡樂,當(dāng)然少不了編碼愛好者!假期編寫了炫酷的HTML動態(tài)鼠標(biāo)特效,超級炫酷酷酷!讓你的頁面變得更加炫酷,讓你的小伙伴們羨慕的大神編碼!快來看看大神是如何編寫的吧! HTML動態(tài)鼠標(biāo)特效 效果圖 動態(tài)鼠標(biāo)效果.html mouse.js 效果圖 炫酷的HTML動態(tài)鼠標(biāo)特效,超

    2024年02月02日
    瀏覽(33)

覺得文章有用就打賞一下文章作者

支付寶掃一掃打賞

博客贊助

微信掃一掃打賞

請作者喝杯咖啡吧~博客贊助

支付寶掃一掃領(lǐng)取紅包,優(yōu)惠每天領(lǐng)

二維碼1

領(lǐng)取紅包

二維碼2

領(lǐng)紅包