background-image

Add background image in SVG

一个人想着一个人 提交于 2019-12-02 11:42:55
I need to add background image in svg. But I'm getting only black rectangle box, the image is not displaying. How to add the background image? This is my code: <style> path { fill: none; stroke: #000; stroke-width: 3px; stroke-linejoin: round; stroke-linecap: round; } </style> <svg width="1000" height="700"> <!-- <rect fill="#fff" width="100%" height="100%"></rect> --> <defs> <pattern id="img1" patternUnits="userSpaceOnUse" x="0" y="0" width="1000" height="700"> <image xlink:href="home/nayana/Documents/Text Editor Files/abstract-hd.jpg" width="600" height="450" /> </pattern> </defs> <path d=

Drawing Bitmap as MainScreen Background. How to Stretch Image?

不打扰是莪最后的温柔 提交于 2019-12-02 11:34:19
I want the background image to stretch all screen. I simply created a VerticalFieldManager and modified paint method. verticalFieldManager = new VerticalFieldManager(VerticalFieldManager.USE_ALL_WIDTH | VerticalFieldManager.NO_HORIZONTAL_SCROLLBAR) { public void paint(Graphics graphics) { graphics.drawBitmap(0, 0, this.getWidth(), this.getHeight(), backgroundBitmap, 0, 0); super.paint(graphics); } }; And when i add a ListField to the verticalFieldManager and scroll, background image is not repaint. How can i repaint background when scroll? Create EncodedImage from your Bitmap , or even

Absolutely true centred background image

六眼飞鱼酱① 提交于 2019-12-02 11:18:12
oI have a site where a centred background image plays a vital part in a homepage animation. The background centres great until the browser window cannot fit in the width of the site, at which point the background kind of left aligns. This is my body code: body { line-height:1; margin:0px auto; padding:0px; background:#90a830 url(img/bg.png) no-repeat center top; } The image popups shoot out from the correct place on the bg image. Try making the browser window smaller and you will see what i mean, the bg moves out of alignment. thanks Andy Set the background left to 50% and the background

How do I set the background image size in CSS?

冷暖自知 提交于 2019-12-02 10:43:00
So I have css code as follows: .jumbobg { background: url('http://znc.mane-frame.com/static/silverleaf.png') fixed no-repeat, url('../img/banner-1008444.jpg') no-repeat, grey; } I was wondering, for the first image (silverleaf.png) - how would I set the background-size for that particular image, using either pixels (for silverleaf) or auto ? I tried with background-size tag, but it would resize all the backgrounds defined above. The thing is that you have specified two backgrounds in background property (separated with comma), so you have to do the same with background-size to get their

Objective-C: Background image and title in Navigation Bar

落花浮王杯 提交于 2019-12-02 09:58:49
问题 In need a background image AND a title in my Navigation Bar. For the image I write a category: @implementation UINavigationBar(MyNavigationBar) - (void)setBackgroundImage { UIImageView *aTabBarBackground = [[UIImageView alloc]initWithImage:[UIImage imageNamed:@"navBarBackgrd.png"]]; [self addSubview: aTabBarBackground]; [self sendSubviewToBack: aTabBarBackground]; [aTabBarBackground release]; } @end I call this category in my AppDelegate and have background images in the whole application:

Check if Div with specific Class exists in the page

浪尽此生 提交于 2019-12-02 09:47:51
I'm trying to modify an existing webpage by inserting my own Javascript file in it. I'm setting a background Image for this webpage by inserting a new Div through my Javascript and setting background of that div to image url. For centering this image on background and to make it occupy the whole webpage, I'm using 'background-size': 'cover' property. This of course doesn't work in older IE versions. I want to fix it, I'm thinking of zooming in the image by specific ratio calculated using page height/width and image height/width. So I want to detect if browser is IE. I checked the webpage and

background-image on divs aren't showing; the divs are collapsing instead

送分小仙女□ 提交于 2019-12-02 09:06:33
CSS: body { background: url("ninabg.jpg") left top no-repeat; background-size: 100% auto; } .image { background-repeat:no-repeat; background-image:url("logo2fix.png"); position:absolute; right:1%; bottom:3%; height:40%; width:35%; } .slo { background-repeat:no-repeat; background-image:url("slo.png"); position:absolute; width:5%; bottom:10%; right:21%; } .eng { background-repeat:no-repeat; background-image: url("eng.png"); position:absolute; width:5%; right:12%; bottom:10%; } HTML: <!DOCTYPE HTML> <html> <head> <!-- META --> <title>Nina Rakovec</title> <meta name="description" content=

How to blur background image of div, without blurring the remaining site or the content of the div

南笙酒味 提交于 2019-12-02 08:09:31
问题 I'm trying to figure out how to blur the background image of a div. The goal is to only blur the background image of the div and not the background of the page itself or the div contents. Here is an example div: <header class="intro"> <div class="background-image"></div> <div class="intro-body"> <div class="container"> <div class="row"> <div class="col-md-8 col-md-offset-2"> <h1 class="brand-heading">Grayscale</h1> <p class="intro-text">A free, responsive, one page Bootstrap theme. <br

Trapezoid Sections, Clipping Background Images

前提是你 提交于 2019-12-02 07:06:04
I am trying to create a web layout with trapezoid shapes like in the image attached. With the addition that each section has a background-image that fills the background with cover or a like result. The first section (dark blue) I have achieved simply using skew and two divs as demonstrated below. However, I can't create the following section, where it skews two ways. I have attempted using clip-path without luck. Then the final section needs to square-off again. HTML <section id="my_section"> <div id="my_section_bg"></div> <div id="my_section_content"> <!-- any typical content, text/images

background-image animation not working in Firefox

限于喜欢 提交于 2019-12-02 05:40:58
I am using the following script to animate a sprite for the background-image for a nav div: $("li#test2").hover( function () { $(this).animate({ 'background-position-y': '-40' }, 500); }, function () { $(this).animate({ 'background-position-y': '0' }, 500); } ); This works fine in Safari and Chrome, but not in Firefox. You can see the page it is on here . Just hover over the first 'home' image in the nav bar. Could someone let me know why it's not working in Firefox? Thanks, Nick background-position-x and background-position-y are not standards. If you want to animate, you must modify both