background-image

Different CSS background-image depending on month and year

大憨熊 提交于 2019-12-07 05:21:41
问题 Basically, I have a div with text in it, and I want the background to display a different image depending on what month and year it is. How can I achieve this? Any help would be greatly appriciated! *I've prepared 4 years worth of monthly images labelled "month0_2011.png" to "month11_2014.png" already if that helps?* 回答1: Add a .php extension to the CSS and use PHP code to determine that. Just use standard PHP tags. For example: body { background-image:url('<?php echo $currentImagePath ?>');

Starting a background image below navbar in Twitter Bootstrap

痞子三分冷 提交于 2019-12-07 05:08:07
问题 Relative CSS/bootstrap newbie. I've spent a while trying to get a background image to integrate with Twitter Bootstrap using the first method on this CSS Tricks page. I wound up using "body" as the CSS tag because HTML just... didn't work. While everything is working fine in general, the image is starting "behind" the top navbar and then extending downward, so the top is hidden behind the black navbar I've tried using margin-top to align the top of the background image with the bottom of the

Why do my image background disappear on float: left?

Deadly 提交于 2019-12-07 03:05:38
问题 I want to create a navbar with images on each end to make it purty. So, I created the HTML and CSS below and it worked great. My menu items are in a ul/li list. When I style the list to put the items all on one line, the images on the ends disappear. What's up with that? How do I fix it? The culprit is float: left; below. --- test.html --- <html> <head> <link rel="stylesheet" href="test.css" type="text/css"> </head> <body> <div id="container"> <div id="header-usernav" class="span-6 last large

How to add background to elementary(EFL) widget?

风格不统一 提交于 2019-12-07 02:39:27
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... 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. Use elm_table widget. By using table, you can pack multiple objects into the same position. create elm_table.

CSS - background-size: cover; not working in Firefox

ぃ、小莉子 提交于 2019-12-07 00:55:31
body{ background-image: url("./content/site_data/bg.jpg"); background-size: cover; background-repeat: no-repeat; font-family: 'Lobster', cursive; } Check: http://demo.jayantbhawal.in on firefox browsers, NOT in widescreen mode. The code works on Chrome(Android + PC) and even the stock Android browser, but NOT Firefox(Android + PC). Is there any good alternative to it? Why is it not working anyways? Googled this issue a lot of times, but no one else seems to have this problem. Is it just me? In any case, how do I fix it? There are quite some questions on SO about it too, but none of them

Table TR with background-size bug Safari

折月煮酒 提交于 2019-12-07 00:52:27
Look at this fiddle, he will work different on safari and chrome: https://jsfiddle.net/sew120xt/1/ Desired look (chrome): https://i.stack.imgur.com/q9ABs.png Bugged look (safari): https://i.stack.imgur.com/Sc6YF.png Seems like Safari will treat the style for TR as a style for his childrens instead, is there a fix for that? You seem to be correct that it is a bug. It isn't just the element <tr> itself but any element displayed as a table-row in a table displayed element. I've replicated the issue in the snippet below using non-table elements by changing the display property of each. (will only

scale div to background image size

半腔热情 提交于 2019-12-06 20:59:36
I have an image that I need to put divs on top of for links. I did this fine when I initially created the website, but now I am tasked with making it responsive, so I can no longer use -top and left values to position the overlay divs because they don't move with the image. Trying to put the image as a background image so that the position of the overlays can be set and contained within the parent container. I have tried using the background size property (cover, contain, 100%), but they will not make the div show all 400px of its height. setting a max height, using auto, or 100% do not work

HTML 5 File load image as background-image

∥☆過路亽.° 提交于 2019-12-06 18:23:17
问题 is it possible to load an image via the HTML 5 File API and make it a css background-image using javascript / jquery? If it's possible, how is it done? 回答1: dronus gave me a great answer to this question by posting this link in the comment section: sveinbjorn.org/dataurls_css You simple have to do the following to use the image data for a css background image: This will save the src data of your image after you create a new and fill and fill it with data using the FileReader() var imgFileData

LESS: concatenate multiple background rules

跟風遠走 提交于 2019-12-06 16:16:15
I have a mixin that creates a gradient with vendors' prefixes, and I would like to add this background to a DIV in addition to another background-image . .horizontal(@start-color: #555; @end-color: #333; @start-percent: 0%; @end-percent: 100%) { background:@start-color; background-image: -webkit-linear-gradient(left, @start-color @start-percent, @end-color @end-percent); background-image: -o-linear-gradient(left, @start-color @start-percent, @end-color @end-percent); background-image+: linear-gradient(to right, @start-color @start-percent, @end-color @end-percent); background-repeat: repeat-x;

Prevent progressive (line by line) loading of background image

跟風遠走 提交于 2019-12-06 14:13:52
I am looking for a way to have the background-images (CSS) load as if they were appearing once loaded, and not "rolling down". I'd rather have an image appear 300ms late in one flash instead of having it appear like a bad PowerPoint effect. Any techniques or specific code that could be used (besides caching)? Thanks, First, if your image appear in "rolling down" it's Image it's too heavy. Exist different program or website for reduce your image for web ( without losing quality ) for sample, Yahoo SMUSH.IT! is good for that! After, I don't know if existing a method for appear background-image