background-image

How to create a custom UIButton (with images) but still use setTitle?

落花浮王杯 提交于 2019-12-06 07:20:33
I've tried creating a UIButton with UIButtonTypeCustom. Then afterwards used the following methods to adjust the look of it [sendButton setImage:[UIImage imageNamed:@"sendButtonOff.png"] forState:UIControlStateNormal]; [sendButton setImage:[UIImage imageNamed:@"sendButtonOn.png"] forState:UIControlStateHighlighted]; [sendButton setImage:[UIImage imageNamed:@"sendButtonDisabled.png"] forState:UIControlStateDisabled]; However the problem is, once you start setting UIImages to the states, setTitle no longer works. I think setTitle only works with non-UIButtonTypeCustom? This means I either have

Change color of SVG background-image (Bootstrap 4 carousel)

岁酱吖の 提交于 2019-12-06 06:31:16
I have a BS 4 carousel with next/prev controls which works so far. I have a light background so I would like to change the color of the controls (currently white). HTML: <div id="carouselQuotes" class="carousel slide quotecaru" data-ride="carousel"> <ol class="carousel-indicators"> <li data-target="#carouselQuotes" data-slide-to="0" class="active"></li> <li data-target="#carouselQuotes" data-slide-to="1"></li> <li data-target="#carouselQuotes" data-slide-to="2"></li> </ol> <div class="carousel-inner"> ... carousel items ... </div> <a class="carousel-control-prev" href="#carouselQuotes" role=

CSS3 background-size - can I guarantee coverage?

余生长醉 提交于 2019-12-06 06:19:59
问题 I have a website that uses an image as its background over the entire page. In order to do this, I am using the new CSS3 spec "background-size", which is set to "cover". background-image: url(/images/House-Remodel-Ideas2.jpg); background-repeat: no-repeat; background-size: cover; Generally speaking this works well, but I noticed that if the window starts to get too narrow (and this a fairly wide image, so even 1024x768 is "too narrow") then the image stop filling the page and instead I see

How do I make the style=“background-image: url()” in the html div go into css so that I could style it?

送分小仙女□ 提交于 2019-12-06 05:56:43
How do I make the style="background-image: url()" in the html div go into css so that I could style it? I tried putting it in different divs, but I keep doing something wrong. Since it's class is two words, I can't style that for some reason... Would I have to style it in html? Here is what I'm working with: <div id="home-slider" class="carousel slide carousel-fade" data-ride="carousel"> <div class="carousel-inner"> <div class="item active" style="background-image: url(images/logo.png)" > <div class="caption"> <h1 class="animated fadeInLeftBig">The **** Organization </h1> <p class="animated

CSS — transparent “glass” modal, everything else darkened

a 夏天 提交于 2019-12-06 04:42:01
THE ANSWER: background-attachment ----- JSBin Example ---- The answer is to use background-attachment ORIGINAL QUESTION I'm working on a project where we want to display a modal that "sees through" to the backdrop, but everywhere outside of the modal panel is slightly masked. I have successfully used border: 10000px rgba(0,0,0,0.3) with border-radius: 10010px but this is a hack, and I can't outline the modal with a box-shadow Is there any standard way for doing this? Bonus points if you can think of a way to apply a transparency filter gradient to an image. I think the best option you got here

How to get the element background image in html using javascript

流过昼夜 提交于 2019-12-06 04:07:20
I want to get all the html page elements' background images that are set using css or the element background property. how can I do this using javascript? The getStyle() function below was taken from http://www.quirksmode.org/dom/getstyles.html#link7 (and slightly modified). Of course you need to make sure the DOM is ready. An easy way to do that is to place the script toward the bottom of the page, just inside the closing </body> tag. <script type="text/javascript"> function getStyle(x, styleProp) { if (x.currentStyle) var y = x.currentStyle[styleProp]; else if (window.getComputedStyle) var y

jQuery get css hover values

落花浮王杯 提交于 2019-12-06 03:17:57
问题 On page ready I want to run a function that will get the css background-image setting and also the hover background-image setting which I wish to then utilize in another fashion. The only method I have seen to accomplish this requires someone to actually mouse over the element before you can get the value. Anyone have a way? This is how to get a css non-hover value: $(this).css('background-color'); 回答1: To do this you will need to read values from the stylesheet directly. The basic idea is to

How to make dialog background image not expand dialog in android?

不打扰是莪最后的温柔 提交于 2019-12-06 01:49:11
In my android project, when I set a background for a dialog in the xml code (the dialog uses a xml file for the layout), the dialog window size increases to fit the background image in it. How can I set it so that the window size does not increase. It just ignores the background part that won't appear in the dialog. I guess the anchor of the image can be the center or the top left, doesn't matter. Does anyone know how to do this? Thanks. HalR If you are setting it in an xml, you can just set the width and height to a set amount, like this: android:layout_width="100dp" android:layout_height=

Safari background-image black lines

流过昼夜 提交于 2019-12-06 00:36:50
Safari 7.0, I don't know why, but I see black lines on my background image When I resize, browser window, the vertical one disappear Does anyone know what is it? website fedoriv.com (only Russian, sorry) In my opinion, it's rendering bug.. Not caused by code, but by the browser.. But I see, you use viewport, so it can be problem with margins in viewport units, or something like that, try to specificate your code here, like css and html around problem areas.. Looks like there is a problem with div, which is positioned above the photo 来源: https://stackoverflow.com/questions/20677718/safari

Place div elements on responsive background (Bootstrap 3)

一个人想着一个人 提交于 2019-12-06 00:03:12
I would like to place div's (input form) on a responsive background. I'm using Bootstrap 3 for the page template. But if I resize the window or use another screen size the elements are on another place. How could I fix this common issue? Example: http://goo.gl/D7TwIP Thanks! Instead of using margin-top and margin-left use top and left properties on a positioned absolute element. top: 540px; left: 117px; position: absolute; Also make sure the parent element is set to position relative. position: relative; 来源: https://stackoverflow.com/questions/23714126/place-div-elements-on-responsive