css basic content background

高洛峰
Release: 2017-03-01 14:59:03
Original
1021 people have browsed it

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;
}
Copy after login


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

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template