CSS3 background-image with bundled sprite image based on images with different original Image Size
By : kenzy imamura
Date : March 29 2020, 07:55 AM
around this issue Ok . So far nobody answered so i decided to choose answer 2. Via calculation! I ve created an Image processing service for web development which handles all the stuff automaticaly at https://github.com/s-a/scream-js if somebody is interested.
|
Background image path is not working even when I use url('../../images/image.png')
By : BrainAmplifier1820
Date : March 29 2020, 07:55 AM
Hope this helps Based on your directory structure, your image is in a folder one level above current location and not two. Which is why you need to use ../ as suppose to ../../ Try this: '../images/hrm_taustakuvan_verkko.png'
|
React background image style not working with local images
By : rajender ameelpur
Date : March 29 2020, 07:55 AM
I wish this helpful for you If you are using create-react-app, you need to import the image using a Javascript module: code :
import nattklunn from './img/Nattklunn.png'; // import logo from '/img/Nattklunn.png'; if img is a folder at root.
[...]
const songs = [{'title' : 'Nattklubb',
'author' : 'DigohD',
'image' : nattklunn},
{'title' : 'LED Beluga',
'author' : 'DigohD',
'image' : nattklunn},
{'title' : 'LED Elephantasia',
'author' : 'DigohD',
'image' : nattklunn}
}]
function LBoxContent(props){
return <div className="lBoxContent" style={lContentStyle(props)}>
{songs[props.index].title}
<br />
{songs[props.index].author}
</div>
}
function lContentStyle(props){
return {backgroundImage: `url(${songs[props.index].image})`}
}
|
background-image not working with local images?
By : Uriel Arbelaez
Date : March 29 2020, 07:55 AM
wish of those help I tried everything to make background image display with my local images. I know that I have the correct image location. because if I use content:url(); it works. , Your missing your "" quotes
|
Why isn't no-repeat working for these background images and how do I get the list text to not sit on top of the image?
By : Thomas Carstensen
Date : March 29 2020, 07:55 AM
this one helps. In answer to your updated question here is a new answer. Although your method will technically work by simply adding some left padding to your anchor and adding a list-style:none; to your .follow class I thought it best to provide a new solution that you can reuse in the future. code :
.follow {
list-style:none;
position:relative;
}
.follow:before {
content:'';
position:relative;
display:inline-block;
width:20px;
height:20px;
top:7px;
background-repeat:no-repeat;
}
.facebookicon:before{
background-image:url('https://www.botanical-art.baeecorp.org/wp-content/uploads/facebook-icon-16x16.png');
}
.flickricon:before {
background-image:url('https://www.botanical-art.baeecorp.org/wp-content/uploads/fluid-flickr-logo-16x16.png');
}
.pinteresticon:before {
background-image:url('https://www.botanical-art.baeecorp.org/wp-content/uploads/pinterest-logo-16x16.png');
}
.twittericon:before {
background-image:url('https://www.botanical-art.baeecorp.org/wp-content/uploads/twitter.gif');
}
.rssicon:before {
background-image:url('https://www.botanical-art.baeecorp.org/wp-content/uploads/rss-logo-blue-bullet-16x16.png');
}
<ul class='follow-background'>
<li class='follow facebookicon'><a href='#' title='' rel='nofollow'>Facebook</a></li>
<li class='follow flickricon'><a href='#' title='' rel='nofollow'>Flickr Photo Albums</a></li>
<li class='follow pinteresticon'><a href='#' title='' rel='nofollow'>Pinterest</a></li>
<li class='follow twittericon'><a href='#' title='' rel='nofollow'>Twitter</a></li>
<li class='follow rssicon'><a href='#' title='' rel='nofollow'>News Announcments ( subscribe to get our latest posts ) </a></li>
</ul>
.follow {
background-repeat:no-repeat;
}
|