Show Output
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Setting Custom background-position of Images in CSS</title> <style> body { background-image: url("/examples/images/robot.png"); background-repeat: no-repeat; background-position: 100% top; } h1, p { margin-right: 200px; } </style> </head> <body> <h1>Background Position Demo</h1> <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Nunc neque. In hac habitasse platea dictumst. Pellentesque ultrices. Donec nunc metus, aliquam sit amet, aliquam in, luctus ac, odio. Aenean orci velit, elementum ac, egestas pellentesque, facilisis non, turpis. Quisque dolor. Vestibulum in massa in lectus hendrerit condimentum. Duis suscipit, ectus varius fermentum fermentum, est lectus facilisis metus, ac ornare risus ipsum at sem.</p> </body> </html>