Style Object backgroundRepeat Property
Style Object
Definition and Usage
The backgroundRepeat property sets whether or not a background-image should be repeated.
Syntax
|
Object.style.backgroundRepeat=repeat_value
|
| Parameter |
Description |
| repeat |
Default. The background image will be repeated
vertically and horizontally |
|
repeat-x |
The background image will be repeated horizontally |
| repeat-y |
The background image will be repeated vertically |
| no-repeat |
The background-image will not be repeated |
Example
Example
The following example repeats the background-image only on the y-axis:
<html>
<head>
<style type="text/css">
body
{
background-color:#FFCC80;
background-image:url(bgdesert.jpg);
}
</style>
<script type="text/javascript">
function changeRepeat()
{
document.body.style.backgroundRepeat="repeat-y";
}
</script>
</head>
<body>
<input type="button" onclick="changeRepeat()"
value="Repeat background-image only on the y-axis" />
</body>
</html>
|
Try it yourself »
|
Style Object
Stylus Studio® 2010 XML Enterprise Suite raises the bar for productivity in XML development tools.
Millions of XML developers and data integration specialists turn to Stylus Studio's comprehensive and intuitive
XML toolset to tackle today's advanced XML data transformation and aggregation challenges.
|
- XML Pipeline Editor, Debugger and Code Generator
- DataDirect XML Converters
- XQuery Mapper, Editor, Debugger, and Profiler
- XSLT Mapper, Editor, Debugger, Designer, and Profiler
- Java and C# for .Net Code Generation
- XML Schema Designer With Documentation Generator
- XML Editor With Full XPath Integration
Download a free trial now
|
|