+ 2
how to put image in background
my image is not saved in that folder where html file.so how i put image in background in that app learn html?plzz give me solution
6 Respostas
+ 6
Here's an example tested in the Playground :
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
<style>
div {
width: 245px;
height: 160px;
color: #fff;
background: url('http://i.imgur.com/cR3K2lM.gif')
}
</style>
</head>
<body>
<div><h2>RUN!</h2></div>
</body>
</html>
+ 2
This app doesn't have permission to access your images. Upload to the Internet then use full url in your css code. You can host images at imgur.com.
+ 1
in Css...
background:url(image.format);
image and Format are Variables..
0
in HTML.
use body tag
<body background="img1.jpg"></body>
0
use css
0
use background:url(""); with corresponding html div