background-image

scale div to background image size

泄露秘密 提交于 2019-12-23 04:27:08
问题 I have an image that I need to put divs on top of for links. I did this fine when I initially created the website, but now I am tasked with making it responsive, so I can no longer use -top and left values to position the overlay divs because they don't move with the image. Trying to put the image as a background image so that the position of the overlays can be set and contained within the parent container. I have tried using the background size property (cover, contain, 100%), but they will

Table TR with background-size bug Safari

▼魔方 西西 提交于 2019-12-23 04:10:35
问题 Look at this fiddle, he will work different on safari and chrome: https://jsfiddle.net/sew120xt/1/ Desired look (chrome): https://i.stack.imgur.com/q9ABs.png Bugged look (safari): https://i.stack.imgur.com/Sc6YF.png Seems like Safari will treat the style for TR as a style for his childrens instead, is there a fix for that? 回答1: You seem to be correct that it is a bug. It isn't just the element <tr> itself but any element displayed as a table-row in a table displayed element. I've replicated

CSS - background-size: cover; not working in Firefox

半世苍凉 提交于 2019-12-23 04:09:50
问题 body{ background-image: url("./content/site_data/bg.jpg"); background-size: cover; background-repeat: no-repeat; font-family: 'Lobster', cursive; } Check: http://demo.jayantbhawal.in on firefox browsers, NOT in widescreen mode. The code works on Chrome(Android + PC) and even the stock Android browser, but NOT Firefox(Android + PC). Is there any good alternative to it? Why is it not working anyways? Googled this issue a lot of times, but no one else seems to have this problem. Is it just me?

How to changing my background-image css property using Mootools?

久未见 提交于 2019-12-23 01:16:06
问题 I am newbie。 How to changing my background-image css property using Mootools? 回答1: Example, on page load: <div id="yourElement"></div> <script type="text/javascript"> window.addEvent('domready', function() { $('yourElement').setStyle('background-image', 'url(path/to/your/image)'); }); </script> 回答2: The MooTools docs for Element.Style should be able to answer this one for you. 回答3: window.addEvents({ // fire when the DOM is loaded domready: function(){ // path to the image var

Button using three (3) background images css

徘徊边缘 提交于 2019-12-22 18:05:17
问题 I'm trying to make a button using three background images so that we can pull in translations for the the text of the button and expand nicely. We'll probably add a base style for IE8 but our designer wants us to use this style and we couldn't recreate it nicely with pure CSS3. Here are the images: Here's the HTML (just a simple button, but thought I should put it anyway: <button class="back clickable" aria-label="Back" onclick="javascript:history.back();">Back</button> I've already tried a

How to make background images clickable (javascript or css)

ぐ巨炮叔叔 提交于 2019-12-22 13:57:09
问题 Please take a look this fiddle How to make the background image clickable? When click "Take the survey" will go to a new page. <div style="height:300px;width:300px;border-style:solid;border-width:5px;background-image:url('http://cdn.survey.io/embed/1.0/right_top_blue.png'); background-repeat:no-repeat;background-position:right top;"> By default, the background-image property repeats an image both horizontally and vertically. </div> Javascript or CSS are all preferred. Edit: I don't want to

Change color of SVG background-image (Bootstrap 4 carousel)

家住魔仙堡 提交于 2019-12-22 12:07:56
问题 I have a BS 4 carousel with next/prev controls which works so far. I have a light background so I would like to change the color of the controls (currently white). HTML: <div id="carouselQuotes" class="carousel slide quotecaru" data-ride="carousel"> <ol class="carousel-indicators"> <li data-target="#carouselQuotes" data-slide-to="0" class="active"></li> <li data-target="#carouselQuotes" data-slide-to="1"></li> <li data-target="#carouselQuotes" data-slide-to="2"></li> </ol> <div class=

How to make dialog background image not expand dialog in android?

落花浮王杯 提交于 2019-12-22 11:12:16
问题 In my android project, when I set a background for a dialog in the xml code (the dialog uses a xml file for the layout), the dialog window size increases to fit the background image in it. How can I set it so that the window size does not increase. It just ignores the background part that won't appear in the dialog. I guess the anchor of the image can be the center or the top left, doesn't matter. Does anyone know how to do this? Thanks. 回答1: If you are setting it in an xml, you can just set

Safari background-image black lines

☆樱花仙子☆ 提交于 2019-12-22 10:45:17
问题 Safari 7.0, I don't know why, but I see black lines on my background image When I resize, browser window, the vertical one disappear Does anyone know what is it? website fedoriv.com (only Russian, sorry) 回答1: In my opinion, it's rendering bug.. Not caused by code, but by the browser.. But I see, you use viewport, so it can be problem with margins in viewport units, or something like that, try to specificate your code here, like css and html around problem areas.. Looks like there is a problem

Anchoring CSS Repeating Background Image

被刻印的时光 ゝ 提交于 2019-12-22 09:39:39
问题 I have a webpage with a header banner in the following configuration: <---Repeating Image Left--><---Banner Image---><---Repeating Image Right---> The page is designed with fixed width content, but the banner spans the entire width of the browser window (thus the reason for including repeating images on the left and right). The two repeating images are different and they are also not standard background images which can be positioned where-ever. Instead, the left image needs to be anchored