background-repeat
In this chapter you will learn:
background-repeat
You can specify a value for both the horizontal and vertical repeats. If you provide only one value, the browser will use that repeat style in both directions.
The background-repeat values are:
Value | Description |
---|---|
repeat-x | Repeats the image horizontally and the image may be fragmented. |
repeat-y | Repeats the image vertically and the image may be fragmented. |
repeat | Repeats the image in both directions and the image may be fragmented. |
space | The image is repeated to fill the space without creating fragments. |
round | The image is scaled to repeat without creating fragments. |
no-repeat | The image is not repeated. |
<!DOCTYPE HTML> <!-- j av a 2 s . c o m-->
<html>
<head>
<style type="text/css">
p {
background-image: url(http://java2s.com/style/download.png);
background-repeat: repeat-x;
}
</style>
</head>
<body>
<p>
HyperText Markup Language (HTML) is the main markup language for
displaying web pages and other information that can be displayed
in a web browser(From From Wikipedia, the free encyclopedia).
</p>
</body>
</html>
Next chapter...
What you will learn in the next chapter:
Home » HTML CSS Tutorial » CSS Reference