css3 - how to set image using css ( background-image property)? -


i need know how set background image in css using background-image property.

the image cannot show in browser. don not know reason file image path desktop should use ../ use set nothing appear .can know please set problem

as understand code follows

.copy{ background-image: url("../sample/wp-content/uploads/gif/banner_12.png") right center no-repeat;  -webkit-background-size: cover;  -moz-background-size: cover;  -o-background-size: cover;  background-size: cover;   } 

in background-image declaration should include image url. instead include right center background-position , no-repeat background-repeat

either write styles separately so

.copy{     background-image :url("../sample/wp-content/uploads/gif/banner_12.png")     background-repeat:no-repeat;     background-position:right center;     background-size: cover; } 

optionally include background-attachment ( scroll default) , background-color ( transparent default )

either write them in single declaration so

.copy {     background:url("../sample/wp-content/uploads/gif/banner_12.png") no-repeat right center / cover  } 

Comments

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

Add new key value to json node in java -