background-image

How to add two background images - left and right from center column

Deadly 提交于 2019-12-03 06:58:25
I have this css: #wrapper1 { min-width:1020px; min-height:100%; } #wrapper2 { height:100%; background: url('img1.jpg') -100px 300px no-repeat, url('img2.jpg') 1165px 300px no-repeat; } #wrapper3 { width:1020px; margin:0 auto; } and this html: <div id="wrapper1"> <div id="wrapper2"> <div id="wrapper3" class="clearfix" <!-- content here --> <p>blah blah blah</p> </div> </div> </div> I need to add 2 images - left and right from center column without center column width changes and that the images did not affect the overall width of the page. Example: I can add images, and made a some attempts

How to position a background image in reveal.js?

安稳与你 提交于 2019-12-03 06:36:06
I want to have a background image on the right hand side of one slide in a reveal.js presentation. I added the image to the slide like this: <section data-background="myImage.jpg"> // content </section> How can I add css styles to make it appear on the right edge of the screen? This article helped to find the solution . You can add a style to the html element for the current section using data-state="something" and of course you can use that style for tweaking your css. So I used this html: <section data-background="myImage.jpg" data-state="img-right"> // content </section> and the following

CSS multiple backgrounds scrolling at different speeds

倖福魔咒の 提交于 2019-12-03 06:29:32
I came across this website today and I was mystified: http://www.actionbutton.net/ Is he using some kind of known technique for his backgrounds that scroll at a different rate and overlap each other. I looked at the source but am pretty confused. Does anyone know what the technique is called and how to learn it? It's call parallax there's plenty of plugin for this e.g. http://www.ianlunn.co.uk/plugins/jquery-parallax/ Here is an approximation of the parallax effect that doesn't use JS (thus backgrounds are scrolling at constant speed). The jfiddle example: http://jsfiddle.net/MFC9B/2/ Key is

background-image: url(“”) in CSS h:outputStylesheet is not loading [duplicate]

て烟熏妆下的殇ゞ 提交于 2019-12-03 05:41:33
问题 This question already has answers here : How to reference JSF image resource as CSS background image url (2 answers) Closed 3 years ago . Sorry if question is not properly asked. Image is showing fine in struts project but not in JSF2 project. All the css and buttons are rendering fine except image that has url in css . Folder structure resources -> css -> bootstrap.min.css resources -> img -> glyphicons-halflings.png bootstrap.min.css background-image: url("../img/glyphicons-halflings.png");

Apply “background-size:cover” to Twitter Bootstrap Carousel slides

ぃ、小莉子 提交于 2019-12-03 05:13:53
问题 I am working with a basic Bootstrap Carousel with three slides. Before I implemented the slider, I had one static image via css background-image of its respective div. In my CSS, I was using background-size:cover, and really liked the way the image responded to different browser widths. Depending on the width of my image, I could get the important section of the image to always stay visibile and centered, while the extra width on either side was only visible on widescreen monitors as an added

CSS background stretches to fill height in iOS but there is white space on scroll

谁都会走 提交于 2019-12-03 05:06:30
this CSS gets my background to fill 100% of the screen height in iOS but there is a minor problem - when you scroll down there is initially white space, then when you release your finger and stop scrolling the background image "adjusts" and fills 100% of the screen height again. The problem does not re-occur on the same page if you continue to scroll, just the first time. Could someone please help? Thanks #background { background: url(../img/background.jpg) center repeat-x; position: fixed; background-size: auto 100%; top: 0; left: 0; right: 0; bottom: 0; z-index: -1 } This happens because

How to make the background image to fit into the whole page without repeating using plain css?

余生长醉 提交于 2019-12-03 04:58:16
问题 I have an JPG image with size 1024 x 724. My page size is not fixed. My requirement is: If I resize the page then the background image should also resize and fit to the page. Also I don't want to keep the image related information in my Html page/JSP. I want to do this using plain CSS. I am not using CSS3. Because there is an attribute called background-size which can make the image stretch to the page width and height. Currently only Google Chrome supports this. Any help ? 回答1: You can't

Is it possible to make a responsive div with a background-image that maintains the ratio of the background-image like with an <img>?

不羁的心 提交于 2019-12-03 04:00:45
问题 Not a a native english speaker so there's probably a better way to shape the question...anyway: What I want to create is similar to the header here: http://thegreatdiscontent.com/adam-lisagor The header image is shown fully in all screensizes, and the aspect-ratio of the image is of course always correct. This is made using an and getting the text to appear on the using position: absolute. But if you use css for the background-image instead of an , you'll get something like this header: http:

Multiple background images positioning

折月煮酒 提交于 2019-12-03 03:37:16
问题 I've got three background images, all of width 643px. I want them to be set out like so: top image (12px height) no-repeat middle image repeat-y bottom image (12px height) no repeat I can't seem to do it without getting them to overlap (which is a problem because the images are partially transparent), is something like this possible? background-image: url(top.png), url(bottom.png), url(middle.png); background-repeat: no-repeat, no-repeat, repeat-y; background-position: left 0 top -12px, left

:before and background-image… should it work?

点点圈 提交于 2019-12-03 03:01:06
问题 I've got a div and apply :before and :after an image as content. That works perfectly. Now I would need to apply a background image so it does repeat as the div resizes, but it does not seem to work. Is background image on :before and :after supposed to be working? The current code: HTML: <div id="videos-part">test</div> CSS: #videos-part{ background-color: #fff; height: 127px; width: 764px; margin: -6px 0 -1px 18px; position: relative; } #videos-part:before{ width: 16px; content: " ";