Home  >  Article  >  Web Front-end  >  css basic content background

css basic content background

高洛峰
高洛峰Original
2017-03-01 14:59:031008browse

css basic content background

html is as follows:

<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>背景</title>
    <link rel="stylesheet"type="text/css" href="style/background.css">
</head>
<body>
<p>这好似一段文字</p>
<p>这好似一段文字</p>
<p>这好似一段文字</p>
<p>这好似一段文字</p>
<p>这好似一段文字</p>
<p>这好似一段文字</p>
<p>这好似一段文字</p>
<p>这好似一段文字</p>
<p>这好似一段文字</p>
<p>这好似一段文字</p>
<p>这好似一段文字</p>
<p>这好似一段文字</p>
<p>这好似一段文字</p>
<p>这好似一段文字</p>
<p>这好似一段文字</p>
<p>这好似一段文字</p>
<p>这好似一段文字</p>
<p>这好似一段文字</p>
<p>这好似一段文字</p>
<p>这好似一段文字</p>
<p>这好似一段文字</p>
<p>这好似一段文字</p>
<p>这好似一段文字</p>
<p>这好似一段文字</p>
<p>这好似一段文字</p>
<p>这好似一段文字</p>
<p>这好似一段文字</p>
<p>这好似一段文字</p>
<p>这好似一段文字</p>
<p>这好似一段文字</p>
<p>这好似一段文字</p>
<p>这好似一段文字</p>
<p>这好似一段文字</p>
</body>
</html>


css样式如下:

p{
    background:url("../../image/2.jpg");
    background-attachment: fixed;
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
}


For more articles related to css basic content background, please pay attention to the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn