lineargradient
鲁上代码:
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>HTML5之linear-gradient背景颜色搭配</title>
<meta name="keywords" content=""/>
<meta name="description" content=""/>
<style type="text/css">
p {
width: 300px;
height: 200px;
border: 1px solid #000;
float: left;
margin: 0 0 10px 10px;
}
/* 默认,从上往下 to bottom 0deg*/
.box1 {
background-image: linear-gradient(red,yellow,blue);
}
/* 从右往左 */
.box2 {
background-image: linear-gradient(to left,red,yellow,blue);
}
/* 从左往右 */
.box3 {
background-image: linear-gradient(to right,red,yellow,blue);
}
.box4 {
background-image: linear-gradient(180deg,red,yellow,blue);
}
.box5 {
background-image: linear-gradient(red 10px,yellow 20px,blue 30px);
/*background-repeat: no-repeat;*/
background-size: 100% 30px;
}
.box6 {
background-image: linear-gradient(red 10px,yellow 0,yellow 20px,blue 0,blue 30px);
background-size: 100% 30px;
}
.box7 {
background-image: linear-gradient(45deg,red 25%,yellow 0,yellow 50%,red 0,red 75%,yellow 0);
/*background-repeat: no-repeat;*/
background-size: 30px 30px;
}
/* repeating-linear-gradient 色标无限循环并重复 */
.box8 {
background-image: repeating-linear-gradient(45deg,red,red 15px,yellow 15px,yellow 30px);
/*background-repeat: no-repeat;*/
/*background-size: 30px 30px;*/
}
.box9 {
background: #58a;
background-image: repeating-linear-gradient(45deg,hsla(0,0%,100%,.1),hsla(0,0%,100%,.1) 15px,transparent 15px,transparent 30px);
}
</style>
</head>
<body>
<p class="box1"></p>
<p class="box2"></p>
<p class="box3"></p>
<p class="box4"></p>
<p class="box5"></p>
<p class="box6"></p>
<p class="box7"></p>
<p class="box8"></p>
<p class="box9"></p>
</body>
</html>
相关阅读
淘宝店铺的装修是非常重要的,每一个页面,每一个细节都不容忽视,合理的图片素材和色彩的搭配,能让店铺看起来更加亲切,更加吸睛。我们前
=============================动态背景===================== 最近在做一些新的项目联系;现在处于那种会的迷迷糊糊,不会的有待提
代码:import javax.swing.*; public class SetTheBackground { public static void main(String args[]) { //插
修改编写java代码窗口背景色 C7EDCC 具体的颜色值
在工业4.0时代,通过数据的分析能够为消费者在驾驶时给出正确的驾驶提醒,并为消费者预测道路的拥堵情况,推荐更佳的路线。2013年4月,德