Javascript 引导网站标题中使用的图像类型
只需转到以下链接: 查看页面顶部的大背景图像。(它是蓝色和紫色的)。我查看了那页的源代码。但是我找不到任何背景的图像文件。所以我很好奇Javascript 引导网站标题中使用的图像类型,javascript,html,css,twitter-bootstrap,Javascript,Html,Css,Twitter Bootstrap,只需转到以下链接: 查看页面顶部的大背景图像。(它是蓝色和紫色的)。我查看了那页的源代码。但是我找不到任何背景的图像文件。所以我很好奇 有什么帮助吗 他们将css3渐变和png图像与:after psedo calss结合使用 参见css类 .jumbotron { position: relative; padding: 40px 0; color: #fff; text-align: center; text-shadow: 0 1px 3px rg
有什么帮助吗 他们将css3渐变和png图像与:after psedo calss结合使用 参见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;
}
试试这个
是创建跨浏览器兼容渐变的绝佳工具
.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;
}
它看起来像一个
线性渐变。。查看.jumbohead
类,我没有找到它,确切地说是哪个类?用你的开发工具在你所指的图像上右键单击,然后查找名为jumbohead
的类。是的,我找到了它。我怎样才能创造出这样的东西。从哪里开始有线索吗?