当前位置: 首页 > news >正文

网站视频链接怎么做的最新国内新闻事件今天

网站视频链接怎么做的,最新国内新闻事件今天,硬件开发平台有哪些,商城网络推广效果演示 实现了一个彩色按钮特效,包括一个按钮(button)和一个前景色(::before)。按钮具有四种不同的颜色,当鼠标悬停在按钮上时,前景色会出现渐变效果,并且按钮的颜色、文本阴影和边…

效果演示

25-彩色浮雕按钮.gif

实现了一个彩色按钮特效,包括一个按钮(button)和一个前景色(::before)。按钮具有四种不同的颜色,当鼠标悬停在按钮上时,前景色会出现渐变效果,并且按钮的颜色、文本阴影和边框阴影会发生变化。整个按钮具有立体感,使其看起来更加美观。

Code

HTML
<!DOCTYPE html>
<html lang="en"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>彩色浮雕按钮</title><link rel="stylesheet" href="./25-彩色浮雕按钮.css">
</head><body><button>求点赞</button><button>求关注</button><button>求收藏</button><button>求转发</button>
</body></html>
CSS
* {margin: 0;padding: 0;
}body {height: 100vh;display: flex;justify-content: center;align-items: center;flex-direction: column;background-color: #e8e8e8;
}button {margin: 10px;width: 280px;height: 90px;font-size: 35px;font-weight: bold;background: transparent;border: 1px solid transparent;cursor: pointer; position: relative;box-shadow: inset 1px 1px 2px #000,inset -1px -1px 2px #808080;color: #333;text-shadow: 1px 1px 0 #808080;overflow: hidden;transition: 0.3s linear 0.15s;
}button:nth-child(1) {--c: #ff4757;
}button:nth-child(2) {--c: #ffa502;
}button:nth-child(3) {--c: #2ed573;
}button:nth-child(4) {--c: #1e90ff;
}button::before {content: "";position: absolute;width: 100px;height: 8px;top: 0;left: 50%;transform: translateX(-50%);border-radius: 0 0 50% 50%;filter: blur(5px);transition: 0.3s;
}button:hover::before {background: var(--c);box-shadow: 0 0 10px var(--c),0 0 20px var(--c),0 0 30px var(--c),0 0 40px var(--c),0 0 50px var(--c);
}button:hover {color: #fff;text-shadow: 0 0 10px var(--c),0 5px 5px #000;box-shadow: inset 1px 1px 2px #000,inset -1px -1px 2px var(--c);
}

实现思路拆分

好的,下面是每行代码的详细讲解及注释:

* {margin: 0;padding: 0;
}

这段代码是设置所有元素的外边距和内边距为0。

body {height: 100vh;display: flex;justify-content: center;align-items: center;flex-direction: column;background-color: #333;
}

这段代码是设置body元素的高度为100vh,使用flex布局,使其水平和垂直居中。同时设置flex-direction为column,使其内部元素垂直排列。并且设置背景颜色为#333。

button {margin: 10px;width: 280px;height: 90px;font-size: 35px;font-weight: bold;background: transparent;border: 1px solid transparent;position: relative;box-shadow: inset 1px 1px 2px #000,inset -1px -1px 2px #808080;color: #333;text-shadow: 1px 1px 0 #808080;overflow: hidden;transition: 0.3s linear 0.15s;
}

这段代码是设置按钮的样式。包括外边距、宽度、高度、字体大小、字体粗细、背景、边框、相对定位、内部阴影效果、字体颜色和文本阴影效果。并且设置过渡效果。

button:nth-child(1) {--c: #ff4757;
}button:nth-child(2) {--c: #ffa502;
}button:nth-child(3) {--c: #2ed573;
}button:nth-child(4) {--c: #1e90ff;
}

这段代码是为每个按钮设置不同的颜色。使用CSS变量(–c)来存储颜色值。

button::before {content: "";position: absolute;width: 100px;height: 8px;top: 0;left: 50%;transform: translateX(-50%);border-radius: 0 0 50% 50%;filter: blur(5px);transition: 0.3s;
}

这段代码是设置前景色的样式。使用伪元素::before,设置宽度、高度、相对定位、顶部和左侧偏移、圆角和模糊效果。并且设置过渡效果。

button:hover::before {background: var(--c);box-shadow: 0 0 10px var(--c),0 0 20px var(--c),0 0 30px var(--c),0 0 40px var(--c),0 0 50px var(--c);
}

这段代码是设置当鼠标悬停在按钮上时,前景色的渐变效果。使用:hover伪类,设置背景颜色和阴影效果。

button:hover {color: #fff;text-shadow: 0 0 10px var(--c),0 5px 5px #000;box-shadow: inset 1px 1px 2px #000,inset -1px -1px 2px var(--c);
}

这段代码是设置当鼠标悬停在按钮上时,按钮的颜色、文本阴影和边框阴影的变化。使用:hover伪类,设置字体颜色、文本阴影效果和内部阴影效果。

http://www.mmbaike.com/news/100062.html

相关文章:

  • o2o网站建设行情关键词优化工具互点
  • wordpress如何建立网站优秀的网页设计网站
  • 百度网址大全网址导航大全苏州网站关键词优化推广
  • 网站建设教程照片淘宝seo优化是什么
  • 做网站推广的价格网站seo置顶 乐云践新专家
  • 青浦练塘网站建设私域流量运营管理
  • 母婴网站建设方案太原做网站推广的公司
  • 厦门移动网站建设哪家专业线上推广渠道主要有哪些
  • 安徽网站开发培训价格百度小程序入口官网
  • 网站建设搭配企业网站seo点击软件
  • 福建网站建设公青岛谷歌推广
  • 如何做聚合类网站网站建站模板
  • 2016广州网站设计公司北京seo公司哪家好
  • 做网站排名要多少钱小程序开发制作
  • 软件系统开发全网优惠北京seo诊断
  • 测试页面网站建设百度浏览器官网下载并安装
  • 公安网站后台管理系统百度推广时间段在哪里设置
  • 怎么找到做网站的客户怎样推广自己的店铺啊
  • 重庆企业网站优化微信搜一搜排名优化
  • 武夷山网站制作培训网站
  • 政府的旅游网站建设郑州竞价托管公司哪家好
  • 深圳市做网站知名公司长沙好的seo外包公司
  • 商标可以做网站吗希爱力的作用与功效
  • 查询网站用什么做的网站优化资源
  • 1688药品批发网vue seo优化
  • 柳州正规网站建设加盟100个经典创意营销方案
  • 重庆网站建站模板公司人民日报最新新闻
  • 右面是某网站建设立项需求百度站长平台如何添加网站
  • 天津 网站建设seo内容优化是什么意思
  • 图片上传 网站建设教学视频谷歌搜索引擎为什么国内用不了