background-image

Rotating a background image with CSS3

99封情书 提交于 2019-11-29 17:50:19
问题 I have a background image that has an arrow that points to the right. When a user clicks on the button, the selected state changes the arrow to point down (using a different background position in my image sprite). Is there anyway to animate this using CSS3 so once the button is clicked and jQuery assigns it a "selected" class, it will rotate in an animation (only 90 degrees) from the right to down? (preferably using the single image/position with the arrow that points to the right) I'm

Jquery IE6 hover problems, keeps loading background image

自古美人都是妖i 提交于 2019-11-29 17:42:17
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? 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(e) {} </script> OR try CSS way html { filter: expression(document.execCommand("BackgroundImageCache", false

CSS Background Image Not Displaying

久未见 提交于 2019-11-29 16:47:31
问题 I have an HTML file with a subdirectory called img with an image called debut_dark.png . In my CSS file, I have: body { background: url(/img/debut_dark.png) repeat 0 0; } The HTML file has the body tag and does include the CSS file appropriately. I know for sure the CSS file is included properly as everything else is formatted properly. The background image is not getting displayed, I am only seeing a white background. Any ideas how to fix this, or even how to debug it? 回答1: According to your

White line appears at end of gradient filled div at specific browser widths

删除回忆录丶 提交于 2019-11-29 14:32:46
I have a div with id #gradient_div with a background-image set to linear-gradient . I'm getting a gap between the end of the linear-gradient and the end of the div #gradient_div only at certain browser window widths. As I stretch and shrink the browser window this white line disappears and reappears. It seems like it has something to do with the margin: When I have the margin set to margin: 0 1%; , the while line appears at specific window widths. At 1% the white line appears whenever the window width ends in the range of 68-92 ex: 4 68 px-4 92 px, 5 68 px-5 92 px, 6 68 px-6 92 px, etc. For

Background image doesn't repeat when browser window is smaller than content?

徘徊边缘 提交于 2019-11-29 13:46:30
I have a header-container with a background image, like so: #header-container { background:url(../img/bg.jpg) repeat-x 0 0px; margin:0px auto; width:100%; text-align:center; } When my browser is in fullscreen (Firefox, Opera, IE), I get the following result (everything is fine): When I resize the browser to a smaller window i got this (so far so well): and when i scroll now to the right the background image doesn't repeat. Is there a way to fix it so that the image will repeat when I scroll to the right? I know it would work when i move the background image into the body of the CSS, but I have

Background image in a nested JPanel?

寵の児 提交于 2019-11-29 12:41:17
I have a JPanel which contains 2 more JPanel. Located on the left(leftBox) and the right(rB), I wanted to add a background image on the right JPanel (rB). But the result I get is http://i.imgur.com/tHz1x.jpg the result I wanted http://i.imgur.com/xHbpx.jpg public void paintComponent(Graphics g) { //this.paintComponent(g); if(wdimage != null) g.drawImage(wdimage,0,0,800,800,rB); //(image,location x, location y, size x, size y) } The rB Panel is blocking the image, what I want is to display the image on the JPanel, and add some jlabels and text field on top of the JPanel and image later on. Here

Changing only y pos of background image via Jquery

无人久伴 提交于 2019-11-29 10:55:00
I want to change button's background image y position with hover function. Is there a simple way of keeping xpos or should I get position first, split it and use again with $.css() again. I should change all 3 span's background position if somebody hover's any of them. So bt_first:hover not seems usable. Here is my usage. I wrote #should stay same# to place that I don't want to change value of xpos: $('.bt_first,.bt_sec,.bt_third').hover(function(){ $('.bt_first,.bt_sec,.bt_third').css({'background-position':'#should stay same# -150px'}) },function(){ $('.bt_first,.bt_sec,.bt_third').css({

UIViewController with background image

本秂侑毒 提交于 2019-11-29 07:16:12
How can I insert into my UIViewController an image from the resources as background image? thanks in advance! Add it UIViewController 's view, somewhat like this: - (void) viewDidLoad { UIImage *background = [UIImage imageNamed: @"background.png"]; UIImageView *imageView = [[UIImageView alloc] initWithImage: background]; [self.view addSubview: imageView]; [imageView release]; [super viewDidLoad]; } UIViewControllers don't have background images. Only views themselves have visual attributes. UIView does not have a background image property. To display a background image, you usually simply put

CSS background image disappearing in Chrome

痞子三分冷 提交于 2019-11-29 06:07:36
This problem is only happening in Google Chrome on Mac OS X (Chrome 17). I've tested it on all the major browsers on Mac and Windows 7. Here is the page in question: http://dealsfortherich.com/drop/ As you can see, I'm loading divs via JQuery AJAX. The page is always fine on "Refresh." You can navigate pages with the left and right arrows. The problem happens when you change pages; especially when you change pages when scrolling the page quickly. Try scrolling the page down very fast and hit the right arrow. The background images that were already loaded via CSS (for example): .sort_block{

CSS: Stretching image to 100% width

时间秒杀一切 提交于 2019-11-29 06:06:44
Hi all I am trying to strech the background of my side to fit the width. I only found big workarounds in the internet. Is there not one single command for this? body { background-image: url(money.jpg); } Thanks for the answers. Doonot sgokhales Use background-size like the one used below, body { background-image: url(money.jpg) no-repeat; background-size: 100%; } Some useful links : Scale background image style Stretch and Scale a CSS image Background - With CSS only If you have a CSS3 browser you can use background-size ( read more about background-size ): body { background-image: url(money