背景图及链接应用样式

来源:互联网 发布:银行家算法经典例题 编辑:程序博客网 时间:2024/05/16 06:24
分: background-image:url(images/logo.jpg);
    background-repeat:no-repeat;
    background-position:left center;

    background-color:#f0f0f0;

合:   background:#f0f0f0 url(images/logo.jpg) no-  repeat left center;颜色,图片,是否重复,起始位置

RGBa是一种同时设置颜色和不透明度的机制。RGB代表红色、绿色和蓝色,a代表alpha透明度

扩展阅读
http://www.w3cplus.com/content/css3-rgba

HTML颜色

http://www.w3school.com.cn/html/html_colors.asp

代码:

<!DOCTYPE html >
<html >
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<style type="text/css">
.box{
    width:0px;
    height:0px;
    border-top: 100px solid rgba(255,0,0,0.2);
    border-left: 100px solid rgba(255,0,0,0.5);
    border-right: 100px solid rgba(255,0,0,0.7);
    border-bottom: 100px solid rgba(255,0,0,0.9);
    }

</style>
</head>
<body>
<div class="box">
</div>
</body>
</html>

结果显示:



0 0
原创粉丝点击