<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>菜鸟教程(runoob.com)</title>
<style>
#grad1 {
background: linear-gradient(rgba(90,149,254,0.25) 0%, rgba(30,73,197,0.25) 100%);
height: 200px;
border: 20px solid;
border-image: linear-gradient(90deg, #5b96ff 0%, #1943c0 100%) 2 2;
}
.text{
font-size:50px;
background-image: linear-gradient(270deg,#1741bf 0%, #5b96ff 100%);
-webkit-background-clip: text;
color: transparent;
}
</style>
</head>
<body><h3>线性渐变 - 透明度</h3>
<p>为了添加透明度,我们使用 rgba() 函数来定义颜色结点。rgba() 函数中的最后一个参数可以是从 0 到 1 的值,它定义了颜色的透明度:0 表示完全透明,1 表示完全不透明。</p><div id="grad1">
<p class="text"
>点此登录</p>
</div><p><strong>注意:</strong> Internet Explorer 8 及之前的版本不支持渐变。</p>
</body>
</html>