Questions tagged [background]

Background typically refers to the rendering behind a container element's contents - usually on a web page, Windows form or other UI presentation medium.

In CSS, the background property is a shorthand property for setting the individual background property values in a single place in the style sheet. This includes the image, color, tiling and position.

In Windows Presentation Foundation (WPF), the background attribute can be defined for any visual UI object. It should be noted that WPF applications use a background thread for handling rendering and repainting.

Desktop applications such as those written in .NET and Java may have colors or images used to fill the window of a particular frame or form.

For information about background threading, see the multithreading wiki.

14810 questions
57
votes
8 answers

Setting A CGContext Transparent Background

I am still struggling with drawing a line with CGContext. I have actually go to line to draw, but now I need the background of the Rect to be transparent so the existing background shows thru. Here's my test code: (void)drawRect:(CGRect)rect { …
Jim B
  • 2,267
  • 6
  • 24
  • 26
56
votes
5 answers

Fallback background-image if default doesn't exist

I want to set an image as a background, however the image name might be either bg.png or bg.jpg. Is there any non-javascript way to create a fallback to an alternative image if the default background doesn't exist? body{ background:…
edisonmecaj
  • 1,062
  • 1
  • 9
  • 20
56
votes
5 answers

Overlay a background-image with an rgba background-color

I have a div with a background-image. I want to overlay the background-image with an rgba color (rgba(0,0,0,0.1)) when the user hovers the div. I was wondering if there's a one-div solution (i.e. not with multiple divs, one for the image and one for…
user1544337
55
votes
6 answers

IE 10 & 11 make fixed backgrounds jump when scrolling with mouse wheel

When you scroll with the mouse wheel in Windows 8 the fixed background image bounces around like crazy. This only affects IE 10 and IE 11. This affects elements with position:fixed as well. Here is an example with a fixed…
ropo
  • 1,466
  • 2
  • 18
  • 29
54
votes
8 answers

Transparent background on winforms?

I wanted to make my windows form transparent so removed the borders, controls and everything leaving only the forms box, then I tried to the BackColor and TransparencyKey to transparent but it didnt work out as BackColor would not accept transparent…
Prix
  • 19,417
  • 15
  • 73
  • 132
54
votes
4 answers

css transition opacity fade background

I am doing a transition where it fades into transparent white, when a user is hovering an image. My problem is that I need to change the color, that it fades to, to black. I have tried just simply adding background:black; to the class that contains…
simon
  • 2,235
  • 6
  • 33
  • 53
54
votes
13 answers

Fixed background image with ios7

I have a project that I am using the fixed background image. It works great on everything except ios7. On the ipad the background image is zoomed in and blurry. Here is the CSS code I am using - .header { display: table; height: 100%; width:…
user2560895
  • 1,481
  • 3
  • 13
  • 11
53
votes
8 answers

(CSS) Make a background image scroll slower than everything else

here is is my CSS code for the body: body { padding: 0; margin: 0; background-image: url("../images/background.jpg"); background-repeat: no-repeat; background-color: grey; background-size: 100%; } What I want to do is make it so that…
user4626554
51
votes
4 answers

How to set a shape's background in xml?

I just created a red circle using android shapes:
Waza_Be
  • 39,407
  • 49
  • 186
  • 260
51
votes
4 answers

how to change svg fill color when used as base-64 background image data?

I'm using SVG for a project, loaded in css like this: background-image:…
Luca Reghellin
  • 7,426
  • 12
  • 73
  • 118
51
votes
15 answers

How can I change my desktop background with python?

How can I change my desktop background with python? I want to do it in both Windows and Linux.
aliva
  • 5,450
  • 1
  • 33
  • 44
50
votes
6 answers

iPhone - Setting background on UITableViewController

Is there any way to set a background view on a UITableViewController? I try with the code I am using on a UIViewController, but the view comes over all the contents of the table view. If I add the background view in the cellForRowAtIndexPath-method,…
Hans Espen
  • 1,127
  • 6
  • 14
  • 22
50
votes
8 answers

How to fade changing background image

I want to fade the images when I do this code: $("#large-img").css('background-image', 'url('+$img+')'); I've tried putting fade in so many places. Thanks
fadejquery
  • 503
  • 1
  • 4
  • 4
50
votes
5 answers

How to scale images to screen size in Pygame

I was wondering how I would go about scaling the size of images in pygame projects to the resolution of the screen. For example, envisage the following scenario assuming windowed display mode for the time being; I assume full screen will be the…
Ilmiont
  • 2,032
  • 4
  • 27
  • 44
50
votes
8 answers

How to change the background color around a DialogFragment?

I'm building a custom DialogFragment. The dialog layout is set to my_dialog.xml, but how can I modify the color around the dialog (the transparent grey)? my_dialog.xml
jul
  • 36,404
  • 64
  • 191
  • 318