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

网站视频链接怎么做的石家庄百度推广优化排名

网站视频链接怎么做的,石家庄百度推广优化排名,大学web网页设计作业,php网站后台模板下载不了效果演示 实现了一个彩色按钮特效,包括一个按钮(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.mnyf.cn/news/51808.html

相关文章:

  • 中小企业网站制作费用是多少?cms系统
  • 阿里云服务器url做网站seo关键词找29火星软件
  • 兴平做网站一键优化清理手机
  • 女鞋网站建设策划方案域名站长工具
  • 做外贸网站赚钱吗申请自媒体平台注册
  • 什么是做网站创建网站的流程
  • 如何百度搜到自己网站seo培训班 有用吗
  • 男学网站开发网站收录情况查询
  • dedecms做网站怎么查看php开源建站系统
  • 做图片能去哪些网站线下推广方法及策略
  • 黄做网站手机如何制作网页
  • 北海教网站建设服务之家网站推广
  • 网站建设与维护是什么内容?企业网址
  • 做公司的网站有哪些东西吗南通seo
  • 做网站给源码吗seo思维
  • h5做商城网站软件优化
  • 义乌兼职网站建设磁力在线搜索引擎
  • android系统app开发店铺seo是什么意思
  • 网站后台 登录界面模板 远吗百度投诉中心24人工
  • 帮助中心网站模板合肥网站优化软件
  • 华人汇和科技园建设有限公司网站谷歌外链代发
  • 陶瓷企业 瓷砖地板公司网站建设宝鸡网站seo
  • 网站banner怎么做的wap网站html5
  • 英文网站google推广营销型企业网站制作
  • wordpress 蜘蛛插件山东关键词优化联系电话
  • 西安建筑网站建设2022百度收录越来越难了
  • 宁波的网络公司比较有名的广告网站建设网站排名优化
  • 网站后台管理水印怎么做网络项目发布网
  • wordpress建站流量网络推广的方法
  • 美容网站制作沧州seo公司