在Bootstrap网站标题中使用的图像类型
Image type used in the Bootstrap websites header
直接进入以下链接:
http://twitter.github.io/bootstrap/看页面顶部的大背景图像。(它是蓝色和紫色)。我查看了那一页的源代码。但是我找不到那个背景的任何图像文件。所以我很好奇。
Any Help ?
试试这个Demo
ColorZilla是创建cross-browser
兼容渐变的好工具。
.test{
background: #020031;
background: -moz-linear-gradient(45deg, #020031 0%, #6d3353 100%);
background: -webkit-gradient(linear, left bottom, right top, color-stop(0%,#020031), color-stop(100%,#6d3353));
background: -webkit-linear-gradient(45deg, #020031 0%,#6d3353 100%);
background: -o-linear-gradient(45deg, #020031 0%,#6d3353 100%);
background: -ms-linear-gradient(45deg, #020031 0%,#6d3353 100%);
background: linear-gradient(45deg, #020031 0%,#6d3353 100%);
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#020031', endColorstr='#6d3353',GradientType=1 );
height: 400px;
width:100%;
}
.test:after {
content: '';
display: block;
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
background: url(http://twitter.github.io/bootstrap/assets/img/bs-docs-masthead-pattern.png) repeat center center;
opacity: .4;
}
他们正在使用css3渐变和png图像与:after psedo类的组合
参见css
类.jumbotron {
position: relative;
padding: 40px 0;
color: #fff;
text-align: center;
text-shadow: 0 1px 3px rgba(0,0,0,.4), 0 0 30px rgba(0,0,0,.075);
background: #020031;
background: -moz-linear-gradient(45deg, #020031 0%, #6d3353 100%);
background: -webkit-gradient(linear, left bottom, right top, color-stop(0%,#020031), color-stop(100%,#6d3353));
background: -webkit-linear-gradient(45deg, #020031 0%,#6d3353 100%);
background: -o-linear-gradient(45deg, #020031 0%,#6d3353 100%);
background: -ms-linear-gradient(45deg, #020031 0%,#6d3353 100%);
background: linear-gradient(45deg, #020031 0%,#6d3353 100%);
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#020031', endColorstr='#6d3353',GradientType=1 );
-webkit-box-shadow: inset 0 3px 7px rgba(0,0,0,.2), inset 0 -3px 7px rgba(0,0,0,.2);
-moz-box-shadow: inset 0 3px 7px rgba(0,0,0,.2), inset 0 -3px 7px rgba(0,0,0,.2);
box-shadow: inset 0 3px 7px rgba(0,0,0,.2), inset 0 -3px 7px rgba(0,0,0,.2);
}
.jumbotron:after {
content: '';
display: block;
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
background: url(../img/bs-docs-masthead-pattern.png) repeat center center;
opacity: .4;
}
相关文章:
- 未捕获的类型错误: 无法读取未定义的属性“图像”
- 如何通过内容类型为“image/jpeg”的 AJAX 调用将画布图像从 GUI 保存到后端
- 灯箱类型的东西,使图像成为浏览器高度的百分比
- 在 javascript 中验证或读取远程图像类型
- ExtJS:“图像”类型的精灵:如何更改像素
- 输入类型的图像在Internet Explorer中不起作用,但在Chrome和Firefox中起作用
- 提交输入类型=“;图像“;到另一个servlet时,未能返回任何参数
- websocketapi-图像编码在客户端不产生任何图像类型
- jQuery image丢弃无效的图像类型,并显示一条无效的消息而不是警告框
- 根据 base 64 内容确定图像类型
- 转换数据:image/png;base64转换为数据库中的图像类型
- 从第4版开始没有图像类型
- Base64图像SRC当我不知道图像类型
- 尝试添加特定图像类型的图像计数| jQuery
- 如何做图像类型验证在magento
- 在Bootstrap网站标题中使用的图像类型
- 如何验证只接受(任何)图像类型文件的表单
- 图像视图-无效的图像类型
- 如何获取图像类型,如果它的src没有'
- 如果上传的文件是音频、视频或图像类型,在使用JavaScript验证时依赖MIME TYPE是否可以?