gpt4 book ai didi

html - Bootstrap 梯度背景错误

转载 作者:行者123 更新时间:2023-11-28 08:06:46 25 4
gpt4 key购买 nike

我想把渐变放到背景中,但是给我发送了错误,请帮忙,留下代码:拜托,我希望整个屏幕都是渐变色,但我现在不知道如何,我尝试了很多东西但没有,我希望文本位于网页中间,谢谢

.header{
background: -webkit-linear-gradient(90deg, #AA076B 10%, #61045F 90%); /* Chrome 10+, Saf5.1+ */
background: -moz-linear-gradient(90deg, #AA076B 10%, #61045F 90%); /* FF3.6+ */
background: -ms-linear-gradient(90deg, #AA076B 10%, #61045F 90%); /* IE10 */
background: -o-linear-gradient(90deg, #AA076B 10%, #61045F 90%); /* Opera 11.10+ */
background: linear-gradient(90deg, #AA076B 10%, #61045F 90%); /* W3C */
height: 50em;
width: 100%;
}
#letraheader{
font-family: 'Righteous', cursive;
font-size: 5em;
color: aliceblue;
text-align: center;
display: table-cell;
vertical-align: middle;
}
#letraheaerdos{
font-family: 'Grand Hotel', cursive;
font-size: 2em;
color: aliceblue;
text-align: center;
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>personal</title>
<link rel="stylesheet" href="css/estilos.css">
<!-- fuentes -->
<link href='http://fonts.googleapis.com/css?family=Righteous' rel='stylesheet' type='text/css'>
<link href='http://fonts.googleapis.com/css?family=Grand+Hotel' rel='stylesheet' type='text/css'>
<!-- fuentes final -->
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<link rel="stylesheet" href="css/bootstrap.min.css">
</head>
<body>

<header class="container-fluid header">

<h1 class="col-xs-12" id="letraheader">HOLA</h1>
<h2 class="col-xs-12" id="letraheaerdos"><em>Bienvenidos a mi pagina de presentacion</em></h2>
</header>


<script src="js/jquery.js"></script>
<script src="js/bootstrap.min.js"></script>

</body>

</html>

最佳答案

试试这个

body{
background: -webkit-linear-gradient(90deg, #AA076B 10%, #61045F 90%); /* Chrome 10+, Saf5.1+ */
background: -moz-linear-gradient(90deg, #AA076B 10%, #61045F 90%); /* FF3.6+ */
background: -ms-linear-gradient(90deg, #AA076B 10%, #61045F 90%); /* IE10 */
background: -o-linear-gradient(90deg, #AA076B 10%, #61045F 90%); /* Opera 11.10+ */
background: linear-gradient(90deg, #AA076B 10%, #61045F 90%); /* W3C */

min-height: 100%;
width: 100%;



}
#letraheader{
font-family: 'Righteous', cursive;
font-size: 5em;
color: aliceblue;
text-align: center;

vertical-align: middle;

}
#letraheaerdos{
font-family: 'Grand Hotel', cursive;
font-size: 2em;
color: aliceblue;
text-align: center;
}
.header{
min-height:100%;
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>personal</title>
<link rel="stylesheet" href="css/estilos.css">
<!-- fuentes -->
<link href='http://fonts.googleapis.com/css?family=Righteous' rel='stylesheet' type='text/css'>
<link href='http://fonts.googleapis.com/css?family=Grand+Hotel' rel='stylesheet' type='text/css'>
<!-- fuentes final -->
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<link rel="stylesheet" href="css/bootstrap.min.css">
</head>




<body>

<header class="container-fluid header">

<h1 class="col-xs-12" id="letraheader">HOLA</h1>
<h2 class="col-xs-12" id="letraheaerdos"><em>Bienvenidos a mi pagina de presentacion</em></h2>
</header>










<script src="js/jquery.js"></script>
<script src="js/bootstrap.min.js"></script>

</body>

</html>

关于html - Bootstrap 梯度背景错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29453513/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com