Wenn diese grünen Balken als Hintergrund für Ihre Website dienen sollen, verwenden Sie einfach Verläufe. Der folgende Code zu sagen angewendet ... Ihr body
oder html
Element die gleiche Wirkung erreichen würde, während die Notwendigkeit für Ihre 3 <div>
Elemente vollständig (vorbehaltlich natürlich Browser-Kompatibilität) Weglassen:
.gradient-bg {
background: rgba(196, 224, 97, 1);
background: -moz-linear-gradient(left, rgba(196, 224, 97, 1) 0%, rgba(196, 224, 97, 1) 33%, rgba(110, 178, 87, 1) 33%, rgba(110, 178, 87, 1) 66%, rgba(0, 155, 67, 1) 66%, rgba(0, 155, 67, 1) 100%);
background: -webkit-gradient(left top, right top, color-stop(0%, rgba(196, 224, 97, 1)), color-stop(33%, rgba(196, 224, 97, 1)), color-stop(33%, rgba(110, 178, 87, 1)), color-stop(66%, rgba(110, 178, 87, 1)), color-stop(66%, rgba(0, 155, 67, 1)), color-stop(100%, rgba(0, 155, 67, 1)));
background: -webkit-linear-gradient(left, rgba(196, 224, 97, 1) 0%, rgba(196, 224, 97, 1) 33%, rgba(110, 178, 87, 1) 33%, rgba(110, 178, 87, 1) 66%, rgba(0, 155, 67, 1) 66%, rgba(0, 155, 67, 1) 100%);
background: -o-linear-gradient(left, rgba(196, 224, 97, 1) 0%, rgba(196, 224, 97, 1) 33%, rgba(110, 178, 87, 1) 33%, rgba(110, 178, 87, 1) 66%, rgba(0, 155, 67, 1) 66%, rgba(0, 155, 67, 1) 100%);
background: -ms-linear-gradient(left, rgba(196, 224, 97, 1) 0%, rgba(196, 224, 97, 1) 33%, rgba(110, 178, 87, 1) 33%, rgba(110, 178, 87, 1) 66%, rgba(0, 155, 67, 1) 66%, rgba(0, 155, 67, 1) 100%);
background: linear-gradient(to right, rgba(196, 224, 97, 1) 0%, rgba(196, 224, 97, 1) 33%, rgba(110, 178, 87, 1) 33%, rgba(110, 178, 87, 1) 66%, rgba(0, 155, 67, 1) 66%, rgba(0, 155, 67, 1) 100%);
filter: progid: DXImageTransform.Microsoft.gradient(startColorstr='#c4e061', endColorstr='#009b43', GradientType=1);
}
Sie sollten Ihren Code in einer Geige oder Schnipsel bereitstellen! –
Ich weiß, dass das Problem in div Höhe 94% ist, aber ich weiß nicht, wie es zu lösen und meine App ist groß, so dass ich nicht Code hochladen, nur Bilder. –
Hast du irgendeine Position in deinen Divs benutzt? Wenn Sie also keine feste oder absolute Position festlegen, wird die Höhe nicht 100% betragen? –