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

css-渐变色矩形

效果图:
在这里插入图片描述

代码:
html:

<!DOCTYPE html>
<html><head><meta charset="utf-8"><meta name="viewport" content="initial-scale=1.0, user-scalable=no" /><title></title><link rel="stylesheet" style="text/css" href="test.css"></head><body><div class="container"><div class="bg"></div></div></body>
</html>

css:

*{margin: 0;padding: 0;box-sizing: border-box;
}.container{width: 100vw;height: 100vh;background-image: url('https://img0.baidu.com/it/u=3091341499,2856166635&fm=253&fmt=auto&app=138&f=PNG?w=1331&h=500');background-repeat: no-repeat;background-size: cover;display: flex;justify-content: center;align-items: center;
}.bg{width: 500px;height: 45px;background-image:linear-gradient(to top, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0)),linear-gradient(to right, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0));border-top: 1px solid;border-bottom: 1px solid;border-image: linear-gradient(to right, rgba(255, 255, 255, 0), rgba(255, 255, 255, 1), rgba(255, 255, 255, 0)) 1 1 stretch;;
}
http://www.lryc.cn/news/210513.html

相关文章:

  • 使用easypoi-spring-boot-starter 4.1.1导入excel报错NoSuchMethodError和NoSuchMethodError
  • matlab中类的分别之handle类和value类——matlab无法修改类属性值的可能原因
  • 3. t2t_vit inference
  • SpringMVC Day 05 : Spring 中的 Model
  • redis6.0源码分析:字典扩容与渐进式rehash
  • 【C++迭代器iterator】
  • 基于群居蜘蛛算法的无人机航迹规划
  • 火爆全网,Python+Requests+Pytest+YAML+Allure实现接口自动化测试(附源码)
  • 【深度学习】【NLP】如何得到一个分词器,如何训练自定义分词器:从基础到实践
  • 线程池的线程回收
  • 【2023.10.25练习】数据库-函数1
  • 基于水循环算法的无人机航迹规划-附代码
  • JVM调优(10)JVM的运行时数据区
  • Python网络爬虫介绍
  • iOS QR界面亮度调整
  • Linux shell编程学习笔记17:for循环语句
  • Go语言用Resty库编写的音频爬虫代码
  • AWTK 液体流动效果控件发布
  • 对mysql的联合索引的深刻理解
  • C的自定义类型
  • 我的创作纪念日 - 2048
  • 拿捏面试官,高频接口自动化测试面试题总结(附答案)狂收offer...
  • 大数据-Storm流式框架(六)---Kafka介绍
  • 自动驾驶的未来展望和挑战
  • 2.11、自定义图融合过程与量化管线
  • Linux——文件权限属性和权限管理
  • 数组与链表算法-单向链表算法
  • Oracle(6) Control File
  • 吴恩达《机器学习》2-5->2-7:梯度下降算法与理解
  • Pytorch detach()方法