本实例实现元素的边框流动特效,主要用到css的伪类、动画html部分:<body> <div class="box"> <h2>css</h2> </div> </body>css代码: html{ height: 100%; } body{ height: 100%; margin: 0; display: flex; align-items: center; justify-content: center; background-color: #444; } .box{ box-shadow: 0 0 180px #666; position: relative;
本实例实现流动色彩效果,用到conic-gradient圆锥渐变,filter、animation动画html页面:<body> <div class="card"> <h2> React JS <span>Fundamental</span> </h2> <div class="more">Learn More</div> </div> </body> </html>css样式部分: body{ margin: 0; background-color: #1e293b; display: flex; justify-content: center; align-items:
后端app.js:const express=require('express') const app=express() app.get('/test',function(req,res){ res.setHeader('Access-Control-Allow-Origin','*') //跨域处理 let data=[ {id:0,name:'张三',age:23}, {id:1,name:'李四',age:13}, {id:2,name:'王五',age:42}, {id:3,name:'刘能',age:55}, {id:4,name:'赵四',age:34}, ] let result={ code:1, data } res.send(JSON.stringify(result)) }) app.listen(8000,function(){ console.log('app is runing at htt
一、npm init 来初始化 package.json,它是 NodeJS 约定的用来存放项目的信息和配置等信息的文件二、安装模块,如expressnpm i express --save
let myreg=/^[1][3,4,5,6,7,8,9][0-9]{9}$/ if(!myreg.test(mobile)){ app.checkForm('手机号格式不正确') }
毛玻璃背景:backdrop-filter: blur(1.25rem); background: hsla(0,0%,100%,.86);效果如下图:渐变字:background: linear-gradient(100.07deg,#2d61fc .83%,#9362ed 34.35%,#f06195 73.39%,#fca1ad 102.87%); -webkit-background-clip: text; color: transparent;效果如下图:
鼠标原有的事件不能实现:pointer-events:none鼠标不可点击时的显示状态:cursor: not-allowed
显示两行,后面显示...display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
铅笔Naruto
前端攻城狮