background-image

CSS Background-Image Path Issues

本小妞迷上赌 提交于 2019-12-17 21:01:47
问题 In amongst my CSS I have the following: #framecontentTop{ position: absolute; top: 0; left: 120px; right: 0; height: 100px; overflow: hidden; background-image: url(/Users/myname/Website Project/logo.jpg); color: white; } Where the path to the image I want to use as the background-image is /Users/myname/Website Project/logo.jpg However, when I put in my div with the ID framecontentTop, it doesn't show the image (or indeed anything) as the background. There are no other divs in the CSS to

IE11 making background image text blurry

半城伤御伤魂 提交于 2019-12-17 20:19:16
问题 I'm working on a website, where I use image sprites on a button. In every other browser I've tried, except for IE11, the text on my sprite is crisp as it should be, but in IE11, the text gets blurry (See images). The blurry one being IE11 ofc. The width of the sprite is 189px and the height is 378px. I use the following CSS: button { width:189px; height:189px; background-image:url('../images/kontakt-os.png'); background-position: top; cursor:pointer; border-radius: 100px; } button:hover {

Why an inline “background-image” style doesn't work in Chrome 10 and Internet Explorer 8?

二次信任 提交于 2019-12-17 18:00:00
问题 Why the following example shows the image in Firefox 4, but not in Chrome 10 and Internet Explorer 8? HTML: <div style="background-image: url('http://www.mypicx.com/uploadimg/1312875436_05012011_2.png')"></div> CSS: div { width: 60px; height: 60px; border: 1px solid black; } Any ideas for workarounds? 回答1: As c-smile mentioned: Just need to remove the apostrophes in the url() : <div style="background-image: url(http://i54.tinypic.com/4zuxif.jpg)"></div> Demo here 回答2: Chrome 11 spits out the

Adding a background image in Ruby on Rails 2 in CSS

坚强是说给别人听的谎言 提交于 2019-12-17 17:36:11
问题 I generated a scaffold in ruby and I want to insert a background image to every page on the site but Im not sure what the link to the image should be. my image is in app/assets/images/"dep.jpg" this is what i have but it isnt working: background-image:url('../images/dep.jpg'); } Any help? thanks 回答1: The webserver in rails takes public folder as the base of the application. Hence its looking for the specific image under /public/images/ instead of app/assets/images/"dep.jpg" & since its not

Change background image opacity

不打扰是莪最后的温柔 提交于 2019-12-17 16:32:00
问题 I have a div element with text blocks and a parent div in which I have set a background image. Now I want to reduce the opacity of the background image. Please suggest how I can do that. Thanks in advance. EDIT: I am looking to change the way my blog post looks at blogger.com by editing the html content. The html code looks as follows: <div> //my blog post </div> I tried to surround the whole code above with a div element and set opacity of each div separately as below: <div style="background

Set an Image object as a div background image using javascript

混江龙づ霸主 提交于 2019-12-17 15:52:02
问题 I want to load 4 images from background showing a load bar to the client and when the images will be downloaded i want to set them as background images to 4 div blocks. I am looking for something like this. var myImages = new Array(); for(var i = 0; i < 4; i++) myImages[i] = new Image(); //load images using the src attribute //and execute an on load event function where to do something like this. var div0 = document.getElementById('theDivId'); div0.style.backgroundImage = myImage[index]; Is

Set an Image object as a div background image using javascript

前提是你 提交于 2019-12-17 15:51:42
问题 I want to load 4 images from background showing a load bar to the client and when the images will be downloaded i want to set them as background images to 4 div blocks. I am looking for something like this. var myImages = new Array(); for(var i = 0; i < 4; i++) myImages[i] = new Image(); //load images using the src attribute //and execute an on load event function where to do something like this. var div0 = document.getElementById('theDivId'); div0.style.backgroundImage = myImage[index]; Is

Is there a way to set background-image as a base64 encoded image?

╄→尐↘猪︶ㄣ 提交于 2019-12-17 15:37:44
问题 I want to change background dynamically in JS and my set of images is in base64 encoded. I try: document.getElementById("bg_image").style.backgroundImage = "url('http://amigo.com/300107-2853.jpg')"; with perfect result, yet I fail to do the same with: document.getElementById("bg_image").style.backgroundImage = "url('data:image/png;base64,iVBORw0KGgoAAAAAAAAyCAYAAAAUYybjAAAgAElE...')"; nor document.getElementById("bg_image").style.backgroundImage = "data:image/png;base64

Android: textColor of disabled button in selector not showing?

你。 提交于 2019-12-17 15:13:13
问题 I am trying to make a button with a selector my button can have the following states: Enabled/Disabled Pressed/Not Pressed According to the states mentioned above. I need to manipulate the button's: Text color background image The button starts off my being disabled so it should have the disabled textColor and the disabled button background. But I can see the default textColor (specified in style) and NO background image! Here is my selector button_selector.xml <?xml version="1.0" encoding=

How do I stretch a background image to cover the entire HTML element?

微笑、不失礼 提交于 2019-12-17 15:12:36
问题 I'm trying to get a background image of a HTML element (body, div, etc.) to stretch its entire width and height. Not having much luck. Is it even possible or do I have to do it some other way besides it being a background image? My current css is: body { background-position: left top; background-image: url(_images/home.jpg); background-repeat: no-repeat; } Thanks in advance. Edit: I'm not keen on maintaining the CSS in Gabriel's suggestion so I'm changing the layout of the page instead. But