background-image

XHTML anchor link with background image and no text

最后都变了- 提交于 2019-12-08 19:53:19
问题 Is it possible to have anchor links no text inside that has a background image and fixed dimensions and still be good for SEO? Example CSS: a{display:block;width:50px;height:20px;background-image:url('images/background.jpg');background-repeat:no-repeat;background-position:0 0;} a:hover img{background-position:0 -20px;} Example HTML: <a href="#"></a> 回答1: If the image has text in it or you simply want to add its description, one thing you can do to help SEO and accessibility is to give the

How can I override only the second image in a multiple background image declaration?

杀马特。学长 韩版系。学妹 提交于 2019-12-08 19:21:21
问题 How can I utilize the cascade to override only the second image in a multiple background image declaration? I have specified a standard style for li s, with two background images (the kitten, and the fish on the right side). I've also specified a style for li.secondary where I want to change only the second of the two background images: li { background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAeCAYAAAA/xX6fAAAA/ElEQVR42q2WYQ3DIBSE5wAJk1AJSKiESpiESakEJCChEpAwCW

full size background image in ie8

放肆的年华 提交于 2019-12-08 13:59:26
I used this property in css but its not working in IE8 html{ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='../../images/bg.jpg', sizingMethod='scale'); -ms-filter: "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='../../images/bg.jpg', sizingMethod='scale')"; } body { background-image:url(../../images/bg.jpg); background-repeat:no-repeat; background-size: cover; -webkit-background-size: cover; -moz-background-size: cover; -o-background-size: cover; } I got many solutions on stackoverflow but none of them worked. How can I solve this? Try this <div id="bg"> <img src=

know of a good CSS-technique for a full-screen background image?

若如初见. 提交于 2019-12-08 13:48:35
问题 i've look around online and tried various ways to go about this, but haven't managed to find one technique that works for me. i'd like my website's background image to be centered, fill the entire browser screen, and work with responsive design. is there an easy technique, besides the CSS3/background-size: cover? that just didn't work at ALL for me (not sure why...). 回答1: If you're not opposed to a solution involving HTML in addition to CSS, you can simulate the background-size: cover

CSS 5-square background pattern

别等时光非礼了梦想. 提交于 2019-12-08 11:37:08
问题 I'm looking for a succinct CSS solution to create a specific pattern for an element's background. The pattern is the tiny one with red dots at the top of this page: Here is the image above magnified so it is easier to see the pattern: I care only about the red dot pattern, not borders. I have tried many variations like the following but can't seem to crack it: div { background-image: linear-gradient(-45deg, red 25%, transparent 25%), linear-gradient(45deg, red 25%, transparent 25%), linear

How make tree on Twitter Bootstrap background like on Twitter?

社会主义新天地 提交于 2019-12-08 11:14:48
问题 I've added the following: body { background-image: url(https://twimg0-a.akamaihd.net/images/themes/theme2/bg.gif); } But the tree is copied several times and not fixed on the left. 回答1: Add no-repeat (to prevent repetition), top left (to keep the image at the desired location) and fixed (to keep the image fixed when you scroll): background: url(http://...) no-repeat top left fixed; I have written a demo on jsFiddle. 来源: https://stackoverflow.com/questions/9251293/how-make-tree-on-twitter

How do i make my background image transparent in CSS if I have the following code?

こ雲淡風輕ζ 提交于 2019-12-08 11:08:56
问题 I am trying to make my background image slightly transparent. I read another article here on this topic but it did not work when I tried it. I hope I didn't give too little or too much info. Here is my HTML code: <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>My Title</title> <link type="text/css" rel="stylesheet" href="../Stylesheets/stylesheet1.css"> <link type="text/css" rel=

How to do centered <h1> with <hr/> on both sides over a background image

自古美人都是妖i 提交于 2019-12-08 11:00:06
问题 How do I create centered <h1> with <hr/> on both sides over a background image ? I also need it to handle various text lengths, scale well for mobile viewing and have the <hr/> go to 100% width of its container. I want this look, but over a background image. There are lots of answers (here, here here and here) for text with lines on either side but all of them rely on using a solid background colour behind the text, which doesn't work for me as the page I want to put this on has a background

How to add background to elementary(EFL) widget?

牧云@^-^@ 提交于 2019-12-08 08:50:49
问题 I want background color(or image) to elementary widget(also container) like grid or box. how can I set background color to elementary widget? in EFL elementary document, I found elm_bg functions, but I can't set it as background to other elementary containers... 回答1: Also asked on tizen.org, this part is unclear apparently https://developer.tizen.org/ko/forums/native-application-development/how-change-button-background-color Theming is the way to go, sample code shared at previous URL. 回答2:

jquery select element based on background image name

末鹿安然 提交于 2019-12-08 08:42:50
问题 I'm trying to select a div with a certain background image this is what I have so far. Not working. Any ideas of what I'm doing wrong? I'm trying to follow the jQuery documentation. var markerShadow0 = $("div[background-image='url(\"http://www.axtsweapons.com/gmarkers/markershadowA.png\")]"); 回答1: background-image is not an attribute of the element but a css style. You will have to iterate all divs and check the css style. $("div").each( function(){ if ( $(this).css('background-image') ===