<html>
<head>
<title>Abakada CSS Demo: background-repeat Attribute</title>
<link href="../shared/demos_blk.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
body {
background-image: url( "../shared/images/repeat.jpg" ) }
button {
background: #345; color: ddf; font: bold }
-->
</style>
</head>
<body id="theBody">
<!-- #include virtual="~/shared/top.inc" -->
<div class="header"><h2>Abakada CSS Demo: <span class="hilite">background-repeat</span> Attribute</h2></div>
<hr size=1 width=92%>
<center>
<h5>This example shows the effects of applying different values possible for the CSS <b>background-repeat</b> style attribute.</h5>
<p id="msg">Select from the background-repeat options below to see how the style is applied, <br>
and note the resulting CSS syntax for the style declaration. </p>
<h3 id="theSyntax">Syntax { background-repeat: repeat }</h3>
<table cellpadding=5>
<tr>
<td><b>Select Option</b></td>
<td><select name="units" tabindex=1 onchange="chgProp ( this.value )">
<option value="repeat">repeat
<option value="repeat-x">repeat-x
<option value="repeat-y">repeat-y
<option value="no-repeat">no-repeat</select></td>
<td><button onclick="reset ( )">Reset</button></td></tr>
</table>
<p class="note">NOTE: The background-repeat property applies to any block element. </p>
</center>
<script language="JavaScript">
<!--
var el = document.all ? document.all [ 'theBody' ] : document.getElementById ( 'theBody' )
var synt = document.all ? document.all [ 'theSyntax' ] : document.getElementById ( 'theSyntax' )
function chgProp ( br ) {
el.style.backgroundRepeat = br;
txt = "Syntax { background-repeat: " + br + " }"
if ( document.all ) synt.innerText = txt;
else if ( document.getElementById ) synt.childNodes [ 0 ].nodeValue = txt;
}
function reset ( ) {
list = document.all ? document.all [ 'units' ] : document.getElementById ( 'units' )
list.value = "repeat"
el.style.backgroundRepeat = "repeat";
txt = "Syntax { background-repeat: repeat }"
if ( document.all ) synt.innerText = txt;
else if ( document.getElementById ) synt.childNodes [ 0 ].nodeValue = txt;
}
//-->
</script>
<hr size=1 width=92%>
<!-- #include virtual="~/shared/viewsrc.inc" -->
</body>
</html>