background-image

full size background image in ie8

孤者浪人 提交于 2019-12-08 05:52:32
问题 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

Setting background-image using jQuery changes background only once

心不动则不痛 提交于 2019-12-08 05:45:43
问题 I'm trying to set background-image property of one element, depending on value of variable. It works only the first time. When I switch to ready, background image stops changing. Images themselves are small - around 8-10 kB. This is my code: if(status != '') { console.log('status'); console.log(status); switch(status) { case 'dev': $('#status').css('background-position','0px -160px'); break; case 'ready': $('#status').css('background-position','0px -240px'); break; case 'soon': $('#status')

Background Image Doesnt Show When Right To Left Is True

强颜欢笑 提交于 2019-12-08 05:00:33
问题 In Windows Form When RightToLeft=yes and RightToLeftLayout=true i can not set any background image for my form! 回答1: From the MSDN entry for the Form.RightToLeftLayout property: Owner draw is not supported when RightToLeftLayout is set to Yes. The owner draw events will still occur, but the behavior of any code you author in these events is not defined. Additionally, BackgroundImage , Opacity , TransparencyKey , and the painting events are not supported. 回答2: add a PictureBox and dock it to

LESS: concatenate multiple background rules

Deadly 提交于 2019-12-08 04:44:52
问题 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

CSS two background images using a sprite

左心房为你撑大大i 提交于 2019-12-08 04:40:58
问题 I'm new to sprites and this particular task is boggling me - please help someone. I currently use two background images like so: body { background-attachment: fixed; background-image: url("images/bktopright.png"), url("images/bkbottomleft.png"); background-position: right top, left bottom; background-repeat: no-repeat; line-height: 1; min-width: 1150px; } In order to improve page load time I'd now like to use one image, a sprite. I think this is unique in that I'd like to use the same image

Java - JPanel with background image AND normal functionality

痞子三分冷 提交于 2019-12-08 03:43:38
问题 I've been looking around and working on making a JPanel able to have an image background. I know there is a ton of information reguarding this ( example 1 and example 2 ). Neither of these are exactly what I'm looking for. What I am looking for, is a way to just add a function or the functionality to set a background image on a JPanel while maintaining everything else. The problem that I have right now is that I have a few classes that extend JPanel and when I change them to extend my new

CSS gradient above background pattern

不打扰是莪最后的温柔 提交于 2019-12-08 03:38:13
问题 I want to make pattern background and a white to black (with transparency) gradient above it. How to work it out and also make it work cross-browser? I'm starting with Mozilla and I've tried to use code below: background: url(../images/bg_pattern.gif), -moz-linear-gradient( rgba(255, 255, 255, 0.5) 5%, rgba(130, 130, 130, 0.5) 95% Of course this does not work. So how to work it out? How would the code look for other browsers? Does IE support many backgrounds and transparency? I think it doesn

A texture that repeats on the left and another that repeats on the right

你说的曾经没有我的故事 提交于 2019-12-08 02:41:21
问题 I don't know how to do this, but I would like to have 2 repeating textures, one that repeats to the left and one to the right. instead of: #header { background-image : Url('My_Two_Textures_Combined.png'); background-repeat : repeat-x; /*Which repeats my joined textures a long the x axis*/ } I would like: #header { background-image : Url('My_Left_Texture'); background-repeat : repeat-x-left; /*Which would ideally repeat my texture to the left on the x axis*/ background-image : Url('My_Right

Getting dimensions of background-image

泪湿孤枕 提交于 2019-12-08 02:16:55
问题 I'm trying to get width and height of element's background-image. When you click on it, it should show it inside the element ("200 300" in this case). HTML: <div id='test'></div> CSS: #test { width: 100px; height: 100px; background-image: url(http://placehold.it/200x300); } JavaScript: $('#test').on('click', function () { $(this).text(getDimensions($(this))); }); var getDimensions = function(item) { var img = new Image(); //Create new image img.src = item.css('background-image').replace(/url\

CSS transform scale to background image

孤街醉人 提交于 2019-12-08 02:09:29
问题 I have beloved CSS part effecting for a image .split-banner .right-cl:hover img { -webkit-transform: scale(1.1); transform: scale(1.1); } I need to apply above CSS to background image contain in a div element How can I do that? 回答1: Change background-size on hover. To mimic scale(1.1) use 110% . div { width: 560px; height: 400px; background: url('http://kenwheeler.github.io/slick/img/fonz1.png') center center no-repeat; } div:hover { background-size: 110%; } <div></div> 来源: https:/