在渐变上方创建文本

时间:2016-02-08 01:24:16

标签: html css twitter-bootstrap-3

我如何将文本(“欢迎使用Mane Frame Radio”)放在我在css中指定的渐变之上(jumbotron:课后)?

Snipp:http://bootsnipp.com/user/snippets/l056a

1 个答案:

答案 0 :(得分:1)

让身体上的bg图像像这样:

body {
background-image: url('http://znc.mane-frame.com/static/silverleaf.png');
background-repeat: no-repeat;
background-attachment: fixed;
}

然后使用渐变作为jumbotron的背景,如下所示:

.jumbotron {
display: block;
margin: 0 auto;
position: relative;
background: linear-gradient(to bottom, rgba(255, 26, 2, 0.2) 0%, rgba(127, 13, 1, 1) 100%);
}

现在您不再需要jumbotron:after