background-image

Create a perfect dashed line with background-image in CSS

时光毁灭记忆、已成空白 提交于 2019-12-04 12:58:57
I would like to have a dotted line below to a text : The web designer have designed a custom dotted so i can’t use : h2 { border-bottom: 4px dashed #fff; display:table; } because it is not conform. What i’ve done : I’ve made an image with a dot and position it with css : h2 { padding-bottom: 20px; display:table; background-image: url('../images/tiret.png'); background-repeat: repeat-x; background-position: center bottom; } It works very well but depending on the width of the text, the last dot could appear cut like you can see on this picture : Do you have a suggestion on how to avoid this ?

iPhone UITableView PlainStyle with custom background image - done “entirely” in code

浪尽此生 提交于 2019-12-04 11:57:34
问题 I have been all over the place, seems the UITableView with a static background issue is well documented, but no one with a straight forward solution? Im building my TableViews entirely in code, like this: UIViewController *tableViewController = [[TableViewController alloc] init]; navigationController = [[UINavigationController alloc] initWithRootViewController:tableViewController]; [tableViewController release]; [window addSubview:navigationController.view]; The window is my main UIWindow

CSS3 background-size - can I guarantee coverage?

孤人 提交于 2019-12-04 11:01:22
I have a website that uses an image as its background over the entire page. In order to do this, I am using the new CSS3 spec "background-size", which is set to "cover". background-image: url(/images/House-Remodel-Ideas2.jpg); background-repeat: no-repeat; background-size: cover; Generally speaking this works well, but I noticed that if the window starts to get too narrow (and this a fairly wide image, so even 1024x768 is "too narrow") then the image stop filling the page and instead I see the background color of the page. This kind of destroys the look of the page. While I suppose I can get

Checking if an image exists before adding it as a background image

可紊 提交于 2019-12-04 08:50:27
There are a few solutions on stack regarding the use of .error() on images to determine if they exist and adding placeholders if they don't, but they all discuss its use strictly on <img> tags. Has anyone performed this type of validation to images that are not being added to <img> tags but rather as backgrounds on divs? We have a set of images coming in from a 3rd party API and there are cases where the entire set of image urls' that are returned do not exist. What would be the proper method in validating a set of images (destined to be background images) to determine if they exist and then

CSS or Javascript - display fallback text if background image not loaded [duplicate]

半腔热情 提交于 2019-12-04 06:53:12
问题 This question already has answers here : CSS background image alt attribute (10 answers) Closed 3 years ago . How can I display text instead of logo, if the logo graphic file isn't loaded or missing? I have div with background PNG image: <div class="iHaveBgImage"> this text should be displayed if bg image is not loaded </div> .iHaveBgImage { background-image: url('img.png') } It doesn't have to be pure CSS, Javascript solution is allowed. I was thinking of onerror event, but it works with

Absolutely true centred background image

﹥>﹥吖頭↗ 提交于 2019-12-04 06:22:09
问题 oI have a site where a centred background image plays a vital part in a homepage animation. The background centres great until the browser window cannot fit in the width of the site, at which point the background kind of left aligns. This is my body code: body { line-height:1; margin:0px auto; padding:0px; background:#90a830 url(img/bg.png) no-repeat center top; } The image popups shoot out from the correct place on the bg image. Try making the browser window smaller and you will see what i

Transparent JFrame background

人走茶凉 提交于 2019-12-04 05:05:36
Is it possible to make a JFrame that has a transparent background and draw an image on it, so only the image will be visible with no border or background? McDowell See Translucent and Shaped Swing Windows by Kirill Grouchnikov. Yes, it's possible in many ways. This is one of them: setUndecorated(true); setBackground(new Color(1.0f,1.0f,1.0f,0.5f)); 4th float (which I set to 0.5f) in Color's constructor is alpha channel. It can be 0.0f - 1.0f depend on transparency you want. Taylor Golden It is possible. If your JFrame is a local variable or field: myJFrame.setUndecorated(true); If your class

Background image width not 100% on iPad

六月ゝ 毕业季﹏ 提交于 2019-12-04 03:42:37
问题 My background images have not been spanning the full width of the browser when viewed on an iPad. This has happened more than once now, so it must be in the way I'm writing the CSS. Here is an example of a footer whose bg image is stopping about 70% of the way on iPad- it has three columns floating within. I've put the full project up here: https://github.com/christineh/TJ-portfolio HTML: <footer> <div class="footer_invs"> <div class="footer"> <h1></h1> <p></p> </div> <div class="footer"> <h1

set background Image to whole application in android

余生颓废 提交于 2019-12-04 03:15:45
问题 I want to set background image to my application in android. So my application already has a theme set in my manifest file like this <application android:theme="@android:style/Theme.NoTitleBar" /> Now this was implemented from the themes of android package. Now i want to add a background image to my entire application how can i do it. <style name="Theme.NoTitleBar.BackgroundImage"> <item name="android:background">@drawable/bitzer_background</item> </style> I want the Theme.NoTitleBar as well.

How to stretch a header across a web page background with CSS

二次信任 提交于 2019-12-04 02:59:16
http://www.stumbleupon.com/ http://www.mixx.com/ Both of these websites have a background header stretched across the page while the content is centered and is covering like say 80% of the width, and that also perfectly aligns with the rest of the layout. I am particularly interested in these two sites, because the header has two background colors, not just one. I am sure there are tons of tutorials on the web, but I do not the keywords to search for. Analyzing stumbleupon.com : The "header" consists actually of two divs: wrapperHeader and wrapperNav . Those two have different background