开启代码之旅 Launch With Code
1406 浏览 6 years, 1 month
20 CSS Background Image & Styles & Parallax
版权声明: 转载请注明出处 http://www.codingsoho.com/http://www.w3school.com.cn/cssref/pr_background-size.asp
base.html
{% block styles %}
{% endblock %}
home.html
{% block styles %}
<style>
body {
border-top: 4px solid #E47541;
/*min-height: 5000px;
/*min-width: 5000px;*/
background: url('{% static "img/beach.jpg" %}') no-repeat center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: conver;
background-size: cover;
/*background-image: url('{% static "img/beach.jpg" %}');*/
/*background-image:url('[https://lh4.googleusercontent.com/-FsgMNhfQLSg/AAAAAAAAAAI/AAAAAAAAaRY/3VnF3vSuWKk/photo.jpg](https://lh4.googleusercontent.com/-FsgMNhfQLSg/AAAAAAAAAAI/AAAAAAAAaRY/3VnF3vSuWKk/photo.jpg)');*/
/*background-repeat: repeat-x;*/
}
</style>
{% endblock %}