background-image

Background image not stretching fully

雨燕双飞 提交于 2019-12-12 12:55:12
问题 I just launched a website the other day and thought it was free of weird CSS mistakes, but apparently it's not. What I am trying to do here is stretching an image to fit the page in height and width. The problem: I have the following markup: <img src="images/night_sky7.jpg" class="stretch" /> and the following CSS applied to it: img.stretch { left: 0px; position: absolute; top: 0px; width: 100%; z-index: 0; } This is working fine on my 17.1' laptop with 1440x900 resolution, but I noticed it

iOS 7.1 UINavigationBar Image

一笑奈何 提交于 2019-12-12 12:33:01
问题 So prior to iOS 7.1 I was setting the background image in my app UINavigation Bar via UI Appearance like so. [[UINavigationBar appearance] setBackgroundImage:[UIImage imageNamed:@"image-name"] forBarMetrics:UIBarMetricsDefault]; It was working fine and the content was getting blurred properly when behind it. Now the content is not blurred at all the navigation bar is just transparent. If I remove the image and set just the navigation bar tintColor it will blur the content correctly. Anyone

Using before and after pseudo-elements on background image

ε祈祈猫儿з 提交于 2019-12-12 12:25:30
问题 I am wanting to construct navigation items from three (background) images, with the first and last a fixed width, and the central a variable width, depending on the width of the text in the nav item. I have been led to believe that using the pseudo elements before and after would be the best method. When I try this though, the main (central) background image for the nav item is overlapping with the before and after background images. You can see what I mean on this page. Here is the CSS: .box

How to Set background image of a custom google map marker?

孤街醉人 提交于 2019-12-12 11:21:45
问题 I have a custom image for Google Marker but another image i have to set on its background. Is it possible to set background image of a map Marker? 回答1: Yes ,You can Try this so question How to create a custom-shaped bitmap marker with Android map API v2 Also read this 回答2: From the answer of @Abx You can add custom marker like that, googleMap.addMarker(new MarkerOptions() .icon(BitmapDescriptorFactory.fromResource(R.drawable.ic_marker_me)) .anchor(0.5f, 1.0f) // Anchors the marker on the

How to load all background images at one time

筅森魡賤 提交于 2019-12-12 09:43:28
问题 I have first website page and it have few background images, which are crossfading. So, the problem is that when page are not cached at computer at first, it's took some time to load next background image on crossfading effect. Any ideas how to load all images at once? JSFiddle: https://jsfiddle.net/sawqo6j9/ var i=0; var imghead=[ "url(http://www.psdgraphics.com/file/abstract-mosaic-background.png)", "url(http://www.psdgraphics.com/file/colorful-triangles-background.jpg)", "url(http://www

Vaadin valo background image

岁酱吖の 提交于 2019-12-12 06:49:10
问题 mytheme.scss file: @import "../valo/valo.scss"; @mixin mytheme { @include valo; background-image: url("img/light-background.jpg"); } my image is in ...VAADIN/themes/mytheme/img/light-background.jpg where is no compiling/running errors, why image isn't displayed as a background? 回答1: Edit: On hold until additional details are provided. Try setting it as the background image for your UI's generated div: @mixin mytheme { @include valo; .v-ui { background-image: url("img/light-background.jpg"); }

CSS change element width from different direction

…衆ロ難τιáo~ 提交于 2019-12-12 06:44:32
问题 I have a div that contains an image element set up as such: <div id="container"> <img src="cat.jpg"/> </div> And CSS: #container { width: 150px; height: 200px; } #container img { width: 200px; height: 200px; overflow: none; } Currently the container width is smaller then the img width meaning that right part of the image is cropped out which is what I want. However, I would like the left part of the image to be cut out instead. I've tried experimenting with background positioning but haven't

Multiple backgrounds on top of each other (Normal, Stretched, Normal)

自古美人都是妖i 提交于 2019-12-12 05:59:25
问题 Since I faced an issue with the background image beeing too short for the content at different resolutions, I tried to split the background into 3 parts and stretching the middle one automatically to fill the space between the top and bottom image accordingly. Unfortunately I didn't manage to realize this in CSS. How to do this exactly? content_background_top.png: 1024 x 68px content_background_middle.png: 1024 x 6px (Stretched) content_background_bottom.png: 1024 x 71px Something like this:

Change pre-defined body background image

泪湿孤枕 提交于 2019-12-12 05:13:14
问题 I found this script to change the body's background image when you click a link. It works, great except the only problem is is that I cannot have a pre-defined bg image in the css or else it won't change. So I remove the css for the background image and it switches the images fine, but I want an image to be default to start with. Script: <script language="JavaScript"> <!-- var backImage = new Array(); // don't change this backImage[0] = "images/bg0.png"; backImage[1] = "images/bg1.png";

Custom mobile button icon with transparency issue

≯℡__Kan透↙ 提交于 2019-12-12 04:53:25
问题 I am using a circular .png with transparency as a custom button icon, but am seeing a square, semi-transparent background around the icon on the Android 4.2.2 browser. It seems to be displaying as expected in all of the browsers that we are targeting, including on the Android 4.1.2 default web browser (tested with Samsung Galaxy S2), except for the Android 4.2.2 default web browser (tested with Samsung Galaxy S4). Screenshots: (Bug) (Expected) jsFiddle Here is a jsFiddle that demonstrates