background-position | |
Syntax: background-position: x y x or y can be:
|
<style type="text/css"> .demo1 { background-image: url("../images/question.gif"); background-repeat: no-repeat; background-position: 185px 18px; width: 200px; border: 1px solid; height: 50px; } </style> <div class="demo1"></div> |
|
<style type="text/css"> .demo2 { background-image: url("../images/question.gif"); background-repeat: no-repeat; background-position: 100% 50%; width: 200px; border: 1px solid; height: 50px; } </style> <div class="demo2"></div> |
|
<style type="text/css"> .demo3 { background-image: url("../images/question.gif"); background-repeat: no-repeat; background-position: right center; width: 200px; border: 1px solid; height: 50px; } </style> <div class="demo3"></div> |
|
<style type="text/css"> .demo4 { background-image: url("../images/question.gif"); background-repeat: no-repeat; background-position: 20%; width: 200px; border: 1px solid; height: 50px; } </style> <div class="demo4"></div> |