background-image

How to replace white background color with transparent of an image in ImageMagick?

Deadly 提交于 2019-11-27 11:34:50
问题 I have an image in .jpg format with white background color . I want to remove the white background color to transparent in Imagemagick . I tried many ways but still the white background can not be removed. Can some one help me to solve this. 回答1: You cannot have transparent background colors in your JPEGs. The JPEG file format doesn't support transparency. If you need transparent background, you need to convert the JPEG to either PNG (high quality, filesize possibly larger than JPEG) or GIF

Calculating Viewport Height on Chrome Android with CSS

谁说胖子不能爱 提交于 2019-11-27 11:20:04
问题 So I noticed that mobile Chrome calculates the address bar into the viewport height. Because of this using height: 100vh on an element doesn't work because when the address bar scrolls the viewport height changes. I was actually able to find a question that had the same issue here on ios, but after investigating further I realized that this happens on all mobile Chrome browsers. When the address bar scrolls out of the viewport and then again when scrolls into the viewport, the viewport height

CSS fading top and bottom “borders”

霸气de小男生 提交于 2019-11-27 10:52:14
问题 Take a look at this : http://jsfiddle.net/wjhnX/ I achieved it with this CSS : background-image: radial-gradient(#CCC, #FFF), radial-gradient(#CCC, #FFF); background-size: 2px 100%; background-position: 0 0, 100% 0; background-repeat: no-repeat; Is this possible to do but the simulated borders would be top and bottom, not left and right ? Thanks ahead ! 回答1: Do you want something like this? Demo (Some breathing space for your content, I've used margin there, just make sure that it will apply

How to add a background image on top of a previous background image?

青春壹個敷衍的年華 提交于 2019-11-27 09:47:07
I have a css page that I am writing and I need to apply a background image in one class and then use a different class to put a partially transparent background image on top of the one that is already there. That is a bit of a word salad so let me give a bit of a demonstration. html{ <div class="background1">...</div> <div class="background1 backgroundFilter">...</div> <div class="background2">...</div> <div class="background2 backgroundFilter">...</div> } css { .background1 { background-image:url(...); } .background2 { background-image:url(...); } .backgroundFilter { background-image:url(...)

Full background image with fade effect

时光怂恿深爱的人放手 提交于 2019-11-27 09:23:02
.crossfade > div { animation: imageAnimation 30s linear infinite 0s; backface-visibility: hidden; background-size: cover; background-position: center center; color: transparent; height: 100%; left: 0px; opacity: 0; position: fixed; top: 0px; width: 100%; z-index: 0; } .crossfade { height: 500px; } #fade1{ background-image: url('../images/taxi.jpg'); } #fade2 { animation-delay: 6s; background-image: url('../images/default.jpg'); } #fade3 { animation-delay: 12s; background-image: url('../images/neuroBG.JPG'); } #fade4 { animation-delay: 18s; background-image: url('../images/new4.jpeg'); } #fade5

(Really) Long Background Image Does Not Render on iPad Safari

懵懂的女人 提交于 2019-11-27 08:53:22
For some unknown reasons, iPad Safari doesn't display a really long background image. In my example , the background image is 1,000 x 10,000 pixels. The same example works on any desktop browser e.g. Safari, Firefox, etc. I am aware of the background-repeat in CSS but unfortunately it isn't applicable in my specific case. Mobile Safari has limits to what size background images it will display before subsampling, you may be getting hit by this problem because of the size of your background: The maximum size for decoded GIF, PNG, and TIFF images is 3 megapixels for devices with less than 256 MB

JFrame with Background Image and a JPanel

六眼飞鱼酱① 提交于 2019-11-27 08:48:28
问题 I have the following: public class Frame { public static void main(String[] args) { JFrame frame = new JFrame("Frame Demo"); Panel panel = new Panel(); frame.add(panel); frame.setBounds(250,100,800,500); frame.setVisible(true); } } public class Panel extends JPanel { JButton singlePlayerButton; JButton multiPlayerButton; BufferedImage image; Gui gui; public Panel() { gui = new Gui(); add(gui); try { image = ImageIO.read(new File("C:\\Users\\void\\workspace\\BattleShips\\src\\Testumgebung\

Poor performance of Chrome using background-size: cover

蹲街弑〆低调 提交于 2019-11-27 07:30:30
问题 I need to cover background in my site and I always see lags/slugs on mouse over or any other action. Do you have any idea how to fix this issue? I have a working example here (If I didnt update the code yet) : http://natgeo.geryit.com ul#posters li { background-position: center center; background-repeat: no-repeat; background-size: cover; float: left; height: 170px; position: relative; width: 25%; } 回答1: It appears webkit doesn't cache the resized image and renders it every time, causing the

background-size: cover not working on iOS

本秂侑毒 提交于 2019-11-27 06:41:06
This is my code: background-color:#fff; background-attachment:fixed; background-repeat:no-repeat; background-size:cover; -moz-background-size: cover; -webkit-background-size: cover; -o-background-size: cover; background-position: center center; It's working on desktop, iPad and Android mobile: On Chrome and Safari on iPhone, the background is too big: Matt Fiocca This happens when you have background-attachment:fixed . On mobile, I usually put background-attachment:scroll inside of a @media query. As @RyanKimber pointed out , fixed attached images use the whole <body> size. On mobile this can

How to make background-image with linear-gradient work on IE 11?

可紊 提交于 2019-11-27 06:36:56
问题 Any idea how I can make background-image with linear-gradient to work on IE 11? The following code works fine on IE 10 but doesn't work on IE 11. background-image: url(IMAGE), -ms-linear-gradient(top, #ffffff, #BEE38F); I can make linear-gradient to work on IE 6-9, 11 using the following filter but background image is not displayed in this case. filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#BEE38F',GradientType=0 ) I'm open to an ideas. Update: