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.
background
14,888
questions
938
votes
22
answers
1.9m
views
Stretch and scale a CSS image in the background - with CSS only
I want that my background image stretch and scale depending on the browser viewport size.
I've seen some questions on Stack Overflow that do the job, like Stretch and scale CSS background for ...
662
votes
31
answers
862k
views
How do I run a node.js app as a background service?
Since this post has gotten a lot of attention over the years, I've listed the top solutions per platform at the bottom of this post.
Original post:
I want my node.js server to run in the background, ...
455
votes
45
answers
397k
views
How to detect when an Android app goes to the background and come back to the foreground
I am trying to write an app that does something specific when it is brought back to the foreground after some amount of time. Is there a way to detect when an app is sent to the background or brought ...
359
votes
15
answers
700k
views
How set background drawable programmatically in Android
To set Background:
RelativeLayout layout = (RelativeLayout) findViewById(R.id.background);
layout.setBackgroundResource(R.drawable.ready);
Is the best way to do it?
344
votes
30
answers
604k
views
How to get div height to auto-adjust to background size?
How do I get a div to automatically adjust to the size of the background I set for it without setting a specific height (or min-height) for it?
331
votes
16
answers
163k
views
What is the difference between background and background-color
What's the difference between specifying a background color using background and background-color?
Snippet #1
body { background-color: blue; }
Snippet #2
body { background: blue; }
319
votes
22
answers
414k
views
SwiftUI - How do I change the background color of a View?
Is there a straightforward way to change the background of a View using SwiftUI?
311
votes
11
answers
602k
views
How to make gradient background in android
I want to create gradient background where the gradient is in the top half and there's a solid color in the bottom half, like in this image below:
I can't because the centerColor spreads out to cover ...
259
votes
12
answers
215k
views
setBackground vs setBackgroundDrawable (Android)
I want to set background drawable of a view. There are two methods for this (as far as I see): setBackground and setBackgroundDrawable.
When I use setBackground, it says it has been added in API ...
234
votes
13
answers
770k
views
CSS: background image on background color
I have panel which I colored blue if this panel is being selected (clicked on it). Additionally, I add a small sign (.png image) to that panel, which indicates that the selected panel has been already ...
200
votes
22
answers
522k
views
How to set background color of a View
I'm trying to set the background color of a View (in this case a Button).
I use this code:
// set the background to green
v.setBackgroundColor(0x0000FF00 );
v.invalidate();
It causes the Button to ...
192
votes
7
answers
337k
views
Stretch background image css?
<td class="style1" align='center' height='35'>
<div style='overflow: hidden; width: 230px;'>
<a class='link' herf='' onclick='topic(<?=$key;?>)'>
<span id='name&...
174
votes
23
answers
141k
views
Android WebView style background-color:transparent ignored on android 2.2
I'm struggling to create a WebView with transparent background.
webView.setBackgroundColor(0x00FFFFFF);
webView.setBackgroundDrawable(myDrawable);
Then I load a html page with
<body style="...
170
votes
2
answers
250k
views
How do I set a Windows scheduled task to run in the background? [closed]
Does anyone know how to set a scheduled task to run in background using Windows Task Scheduler?
There doesn't seem to be any option to do this.
164
votes
13
answers
471k
views
Full screen background image in an activity
I see many applications that use a full-screen image as background.
This is an example:
I want to use this in a project, the best way I've found so far to do this is to use an image with a large size,...