我想用HTML在我的网站中放置渐变背景,但它不是全屏显示!
我的代码:
.princip, .body, .html {
width:100%;
height:100%;
/* Permalink - use to edit and share this gradient: http://colorzilla.com/gradient-editor/#ffbfbf+0,23538a+100 */
background: rgb(255,191,191); /* Old browsers */
background: -moz-linear-gradient(45deg, rgba(255,191,191,1) 0%, rgba(35,83,138,1) 100%); /* FF3.6-15 */
background: -webkit-linear-gradient(45deg, rgba(255,191,191,1) 0%,rgba(35,83,138,1) 100%); /* Chrome10-25,Safari5.1-6 */
background: linear-gradient(45deg, rgba(255,191,191,1) 0%,rgba(35,83,138,1) 100%); /* W3C, IE10+, FF16+, Chrome26+, Opera12+, Safari7+ */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffbfbf', endColorstr='#23538a',GradientType=1 ); /* IE6-9 fallback on horizontal gradient */
}
两边还有一点空白...
答案 0 :(得分:0)
我认为这可以为您提供帮助:
body {
margin: 0;
padding: 0;
}