css 样式怎么样实现页面背景颜色的渐变?
<div style="color: black; text-align: left; margin-bottom: 10px;"><span style="color: black;">
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">实现渐变色,<span style="color: black;">能够</span><span style="color: black;">运用</span>线性渐变实现如图<span style="color: black;">各样</span>渐变色效果(源码在文末),下面着重讲其中的线性渐变</p>
<div style="color: black; text-align: left; margin-bottom: 10px;"><img src="https://pic1.zhimg.com/80/v2-09f28d71ac22e8f8251f34006830c293_720w.jpg?source=2c26e567" style="width: 50%; margin-bottom: 20px;"></div>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">渐变属性渐变:bac<span style="color: black;">公斤</span>round-image</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">渐变是CSS3<span style="color: black;">其中</span>比较丰富多彩的一个特性,<span style="color: black;">经过</span>渐变<span style="color: black;">咱们</span><span style="color: black;">能够</span>实现许多炫丽的效果,有效的减少<span style="color: black;">照片</span>的<span style="color: black;">运用</span>数量,并且<span style="color: black;">拥有</span>很强的适应性和可扩展性。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">渐变分为:</p>
<h2 style="color: black; text-align: left; margin-bottom: 10px;">线性渐变</h2>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">bac<span style="color: black;">公斤</span>round-image: linear-gradient:沿着某条直线朝一个方向产生渐变效果。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">基本语法举例</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"> linear-gradient(方向,<span style="color: black;">初始</span>颜色,颜色...,终止颜色);</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"> 方向:to left to right to top to bottom<span style="color: black;">或</span><span style="color: black;">方向</span>30deg顺时针</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">渐变1:<span style="color: black;">初始</span>颜色,终止颜色:yellow, green</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"> 渐变2:颜色+<span style="color: black;">起始</span>位置:</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"> yellow 0%,</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"> red 40%,</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"> green 70%,</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"> blue 100%</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"> 突变:颜色1+<span style="color: black;">起始</span>位置,颜色1+结束位置,颜色2+<span style="color: black;">起始</span>位置,颜色2+结束位置,....:</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"> yellow 0%,</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"> yellow 25%,</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"> blue 25%,</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">blu</p>
</span></div>
我深感你的理解与共鸣,愿对话长流。 外链发布社区 http://www.fok120.com/ 系统提示我验证码错误1500次 \~゛, 论坛的成功是建立在我们诚恳、务实、高效、创新和团结合作基础上,我们要把这种精神传递下去。
页:
[1]