html - Background image using a remote url -


i have simple html page

<html> <head> <meta charset="utf-8"> <title>algostash</title> <style> html {    background: url("<?php echo base_url('assets/sea.jpg');?>" no-repeat center center fixed;    -webkit-background-size: cover;   -moz-background-size: cover;   -o-background-size: cover;   background-size: cover; }  </style> </head> <body> <audio src="<?php echo base_url('assets/avinu.mp3');?>" autoplay></audio> </body> <!-- אבא שלנו, המלך שלנו --> </html> 

that produces html

<html> <head> <meta charset="utf-8"> <title>algostash</title> <style> html {    background: url("http://algopesa.com/assets/sea.jpg" no-repeat center center fixed;    -webkit-background-size: cover;   -moz-background-size: cover;   -o-background-size: cover;   background-size: cover; }  </style> </head> <body> <audio src="http://algopesa.com/assets/avinu.mp3" autoplay></audio> </body> <!-- אבא שלנו, המלך שלנו --> </html> 

however, page not display image.

why code

html {    background: url("http://algopesa.com/assets/sea.jpg" no-repeat center center fixed;    -webkit-background-size: cover;   -moz-background-size: cover;   -o-background-size: cover;   background-size: cover; } 

not produce background image although image present?. how can make image display?.

you need close url(... ), otherwise not work:

<html> <head> <meta charset="utf-8"> <title>algostash</title> <style> html {    background: url("<?php echo base_url('assets/sea.jpg');?>") no-repeat center center fixed;    -webkit-background-size: cover;   -moz-background-size: cover;   -o-background-size: cover;   background-size: cover; }  </style> </head> <body> <audio src="<?php echo base_url('assets/avinu.mp3');?>" autoplay></audio> </body> <!-- אבא שלנו, המלך שלנו --> </html> 

Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -