字体渐变 border-image
2018-03-16 11:24
260 查看
文字渐变效果使用background-image+ background-clip + text-fill-color来实现,具体介绍请看点击打开链接
文字阴影使用text-shadow来实现,具体介绍请看点击打开链接
图片边框使用border+border-image来实现,具体介绍请看点击打开链接边框阴影使用box-shadow来实现,具体介绍请看点击打开链接
下面是一个小栗子及代码:css:[css] view plain copy<style type="text/css">
.example{
width: 400px;
font-family: ´微软雅黑´;
font-size: 5em;
color: green;
margin: 20px auto;
text-align: center;
}
.gradual{
background-image: -webkit-gradient(linear, 0 0, 0 bottom, from(yellow), to(blue));
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
.shadow1{
text-shadow: 5px 5px 5px gray;
}
.border1{
border: 2px dashed gray;/*dashed为虚线,solid为实线,dotted为点线,double为双线*/
}
.border2{
border: 10px solid;
border-image:url(./border.jpg) 10 repeat;
}
.border-shadow{
border: 1px solid black;
box-shadow: 0 0 15px 5px red;/*15px表示模糊半径,5px表示扩展半径*/
}
</style>
html:[html] view plain copy<div id="box">
<div class="example gradual">文字渐变</div>
<div class="example shadow1">文字阴影</div>
<div class="example border1">边框1</div>
<div class="example border2">边框2</div>
<div class="example border-shadow">边框阴影</div>
</div>
效果:
文字阴影使用text-shadow来实现,具体介绍请看点击打开链接
图片边框使用border+border-image来实现,具体介绍请看点击打开链接边框阴影使用box-shadow来实现,具体介绍请看点击打开链接
下面是一个小栗子及代码:css:[css] view plain copy<style type="text/css">
.example{
width: 400px;
font-family: ´微软雅黑´;
font-size: 5em;
color: green;
margin: 20px auto;
text-align: center;
}
.gradual{
background-image: -webkit-gradient(linear, 0 0, 0 bottom, from(yellow), to(blue));
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
.shadow1{
text-shadow: 5px 5px 5px gray;
}
.border1{
border: 2px dashed gray;/*dashed为虚线,solid为实线,dotted为点线,double为双线*/
}
.border2{
border: 10px solid;
border-image:url(./border.jpg) 10 repeat;
}
.border-shadow{
border: 1px solid black;
box-shadow: 0 0 15px 5px red;/*15px表示模糊半径,5px表示扩展半径*/
}
</style>
html:[html] view plain copy<div id="box">
<div class="example gradual">文字渐变</div>
<div class="example shadow1">文字阴影</div>
<div class="example border1">边框1</div>
<div class="example border2">边框2</div>
<div class="example border-shadow">边框阴影</div>
</div>
效果:
相关文章推荐
- h5绚丽的边框-border渐变和字体颜色渐变
- html5学习-CSS3-border-image属性
- css渐变色彩 省略标记 嵌入字体 文本阴影全面了解
- CSS3边框背景-边框背景(-border-image)
- css3:border-image边框图像详解
- Qt 切图,九宫格图标 多合一图标 border-image 设置图标
- border-image
- 解决新版本Chrome无法显示border-image问题
- 【ps】制作字体上的渐变颜色
- css3 border-image
- CSS3 border-image的使用方法
- 用border-image实现波浪边框
- GDI+ DrawImage函数拉伸图片时自动渐变问题
- 【UnityShader】设置Image组件图片透明四个方向透明渐变(Sprite原理相同)
- 制作图片边框:《CSS3 Border-image》
- iOS下border-image不起作用的解决办法
- CSS3 border-image详解、应用
- 图片边框border-image
- CSS3 border-image的使用方法
- CSS3: border-image 详解