background-image

Background center with chrome (bug)

北慕城南 提交于 2020-01-01 00:44:11
问题 I have a background image centered that Chrome displays offset by one pixel. CSS #container { background: url("images/header.jpg") no-repeat scroll 50% transparent; width: 100% } #header { width: 986px; margin: 100px auto 0 auto; } HTML <html> <body> <div id="container"> <div id="header">centered content</div> </div> </body> </html> I guess it has to do with how different browsers handle the center -or 50% - property of the background in CSS: Is there a known (simple) hack or alternative

background-image on divs aren't showing; the divs are collapsing instead

[亡魂溺海] 提交于 2019-12-31 06:51:31
问题 CSS: body { background: url("ninabg.jpg") left top no-repeat; background-size: 100% auto; } .image { background-repeat:no-repeat; background-image:url("logo2fix.png"); position:absolute; right:1%; bottom:3%; height:40%; width:35%; } .slo { background-repeat:no-repeat; background-image:url("slo.png"); position:absolute; width:5%; bottom:10%; right:21%; } .eng { background-repeat:no-repeat; background-image: url("eng.png"); position:absolute; width:5%; right:12%; bottom:10%; } HTML: <!DOCTYPE

background-image on divs aren't showing; the divs are collapsing instead

我是研究僧i 提交于 2019-12-31 06:51:05
问题 CSS: body { background: url("ninabg.jpg") left top no-repeat; background-size: 100% auto; } .image { background-repeat:no-repeat; background-image:url("logo2fix.png"); position:absolute; right:1%; bottom:3%; height:40%; width:35%; } .slo { background-repeat:no-repeat; background-image:url("slo.png"); position:absolute; width:5%; bottom:10%; right:21%; } .eng { background-repeat:no-repeat; background-image: url("eng.png"); position:absolute; width:5%; right:12%; bottom:10%; } HTML: <!DOCTYPE

Trapezoid Sections, Clipping Background Images

被刻印的时光 ゝ 提交于 2019-12-31 04:32:09
问题 I am trying to create a web layout with trapezoid shapes like in the image attached. With the addition that each section has a background-image that fills the background with cover or a like result. The first section (dark blue) I have achieved simply using skew and two divs as demonstrated below. However, I can't create the following section, where it skews two ways. I have attempted using clip-path without luck. Then the final section needs to square-off again. HTML <section id="my_section"

jQuery - possible to resize background-image to a set size?

只愿长相守 提交于 2019-12-31 01:39:36
问题 I'm in a situation where I urgently need to fit a background image of a div to a certain size. Does anyone know if this is possible with jQuery? I know the size it needs to be, it doesn't have to resize with the size of the div. 35,000 images have been scaled to the wrong size and it needs to go live so resizing the images isn't an option! Any advice appreciated! EDIT: I'm just seeing whether we're able to alter the HTML to take the background image out of the DIV and put it in a separate

Loading CSS background images before normal images?

非 Y 不嫁゛ 提交于 2019-12-30 10:41:28
问题 I have a ruby on rails web app, and in some views i have many heavy images( <img> ) to render .The <img> are generated in a Helper. The problem is that the css is loaded first, then the js, then the heavy images , and then finally the css refereneced background images. It takes quite a while for all of the heavy images to load, which therefore holds the whole site up. I want to load first the css background images then load the other images, as they obviously hold visual structure of the page

Image behind buttons in tkinter (PhotoImage)

ぐ巨炮叔叔 提交于 2019-12-30 10:35:19
问题 I've been trying to add an image so that my buttons sit on top of the image, but have only been able to make the image cover everything completely or force the image to be underneath the horizontal part the buttons cover. Here is the relevant code for it: class MainMenu(Frame): def __init__(self, master): Frame.__init__(self, master) self.master = master self.initUI() def initUI(self): self.master.title("Adventure") bg = PhotoImage(file="Background-gif.gif") newGameButton = Button(self, text=

Repeating background in cocos2d has black edges!

孤者浪人 提交于 2019-12-30 05:04:06
问题 I am attempting to setup a tiled/repeating background for my iPhone app. The code "works" in that the background is repeating like it should be but I seem to have a black border around each repetition and I dont know why, the image is exactly 200x200. Here is a screenshot of how it looks along with the code: if ((self=[super init])) { CCSprite * bg = [CCSprite spriteWithFile:@"pattern11.jpg" rect:CGRectMake(0, 0, 1000, 520)]; [bg setPosition:ccp(0, 0)]; ccTexParams params = {GL_LINEAR,GL

Jquery IE6 hover problems, keeps loading background image

旧街凉风 提交于 2019-12-29 09:28:07
问题 Take a look at this page: http://pearl.tinderfields.com/ In IE6 the menu's background image loads every time the user hovers over a menu item, which is obviously making a very rubbish looking menu. Is there any special reason as to why IE6 would re-load the image on every hover? 回答1: Read This: http://www.adobe.com/cfusion/communityengine/index.cfm?event=showdetails&productId=1&postId=1104 <script type="text/javascript"> try { document.execCommand('BackgroundImageCache', false, true); } catch

Background size on iOS

空扰寡人 提交于 2019-12-28 11:50:48
问题 I've spent the morning doing research on the following issue. I'm making a one page site, using a lot of images. I'm aware that Safari is known for its weird handling of background-attachment:fixed, but that's working fine; my problem is background-size:cover is not working in conjunction with fixed . I have 5 pages, all of which have a height or min-height of 100%. The last page is fixed like this: #div5 { height:100%; width:100%; position: relative; background-image: url("img/background.jpg