background-image

CSS Background. Combining content-box with cover

夙愿已清 提交于 2019-12-20 03:11:51
问题 If I use both background-origin: content-box; and background-size: cover; on an element with some padding. The background image still covers the bottom padding (in latest versions of Safari, Chrome, Firefox and IE) div { background-image: url('http://lorempixel.com/400/200/'); background-origin: content-box; background-repeat: no-repeat; background-size: cover; border: 5px red solid; padding: 20px; } jsfiddle here Is this the correct behaviour? If so, why (am I missing something obvious here)

Background image path not working in firefox

杀马特。学长 韩版系。学妹 提交于 2019-12-19 19:55:47
问题 I'm running into a problem with background image of an <li> loading in firefox. my original code was: background: #bdcad7 url(../images/navbg.png) repeat-x; which works well in chrome and IE but not in FF. background: #bdcad7 url(images/navbg.png) repeat-x; also works in IE and chrome but not in FF The only way to get it working in FF is if I include the next directory level background: #bdcad7 url(/includes/images/navbg.png) repeat-x; but that doesn't work in other browsers. I've tried all

background-size transition on hover causes chrome to “shake” background image

ぃ、小莉子 提交于 2019-12-19 18:47:11
问题 I am trying to achieve an effect I saw recently, where background image zooms on hover. I pretty much did it with example here: https://jsfiddle.net/qyh6nbwt/ but it seems to be very shaky (you will understand what I mean by hovering over it), I'm on osx running latest chrome version, have not checked it in other browsers yet. Is there a way to make it smoother, so it doesn't "shake" on zoom in? HTML <div id="example"> test </div> CSS #example { background-image: url(http://www

Use CSS to make background-image above background-color in a list

亡梦爱人 提交于 2019-12-19 17:43:09
问题 This is the code <ul> <li class="test"> <a href="#"> <h2>Blah</h2> <p>Blah Blah Blah</p> </a> </li> </ul> Basically, my list already has some styling, for example, I set the background-color for it. Now in the class "test", I also set a background-image. My question is I want to make the background-image stays above the background-color and I dont know how to achieve this. I tried with z-index but I think it is not applicable for background-image. Please take a look at the image Edit: This is

How to save a Forms Background Image using My.Settings.Save Visual Basic

a 夏天 提交于 2019-12-19 12:22:14
问题 I'm trying to make an Operating System in Visual Basic (program based of course) and it needs personalisation. I want the user to be able to choose from a select group of images, stored in the Resources of the project, and I want that image to be saved, so that the next time they log on to the software, the form has the same image they selected saved. Extra Information: The image selection is on a seperate form. Using: If ComboBox1.Text = "Beach Fade" Then PictureBox1.BackgroundImage = My

background-image in div – Google indexing?

我是研究僧i 提交于 2019-12-19 11:43:05
问题 I've a list of empty divs and dynamically inserting a background image – so at first, their background-image: url(); property is completely empty. With some event, it's background-image url loads into the previously empty background-image: url(); tag. The url of the appearing background-image is temporarily stored in the "alt" tag of the div: <div style='background-image: url();' alt='http://something...'></div> . I'm doing so to get round corners on several animated gifs without using

OpenCV: read matrix value

心已入冬 提交于 2019-12-19 09:12:14
问题 I want to count the number of white points in a background image which is only black and white. I have a code like this: int count = 0; for ( int j = 0; j < Image.rows; j ++ ) { for ( int i = 0; i < Image.cols; i ++ ) { if ( Image.at<int>(i,j) >= 150 ) { count ++ ; } } } For some reason, the above code doesn't work, it just stops reacting. I checked, and the line" if ( Image.at(i,j) >= 150 ) " causes the problem. My "Image" is a "cv::Mat", with "CV_8UC3" type. Is there someone can help me?

OpenCV: read matrix value

两盒软妹~` 提交于 2019-12-19 09:11:21
问题 I want to count the number of white points in a background image which is only black and white. I have a code like this: int count = 0; for ( int j = 0; j < Image.rows; j ++ ) { for ( int i = 0; i < Image.cols; i ++ ) { if ( Image.at<int>(i,j) >= 150 ) { count ++ ; } } } For some reason, the above code doesn't work, it just stops reacting. I checked, and the line" if ( Image.at(i,j) >= 150 ) " causes the problem. My "Image" is a "cv::Mat", with "CV_8UC3" type. Is there someone can help me?

iOS 5 [UINavigationBar appearance] setBackgroundImage does not do work

天涯浪子 提交于 2019-12-19 08:09:07
问题 I created a new test iOS5 project in Xcode 4.2 Build 4D199 and tried to set the appearance of the UINavigationBar as described above, but nothing happens. The code I tried in the viewDidLoad : [[UINavigationBar appearance] setBackgroundImage:[UIImage imageNamed:@"navbar-iphone.png"] forBarMetrics:UIBarMetricsDefault]; The only way I can get it to work is to set the appearance on the instance of the UINavigationBar . Like: [self.navigationController.navigationBar setBackgroundImage:[UIImage

Is there an ideal size for background images?

偶尔善良 提交于 2019-12-19 06:30:02
问题 For example, would a 1x1 image load faster than a 2x2? The size would be smaller, but the browser would have to work twice as much, right? So, is there an ideal size and shape (square vs rectangle) for background images? I know it's probably not too important, but I'm interested to know. Thank you 回答1: I don't think there is an 'ideal' size for your image. Although the quality of the image will have a role in the download time. An image with rich colors embedded will be heavy in size compared