css3

What are the “golden rules” to increase CSS3 transition performance on mobile devices?

流过昼夜 提交于 2019-12-30 02:11:25
问题 I am using some really simple CSS3 transitions in my app like in the following example where I try to slide in a div container from left to right: <div id="navi"> <form> <input>...</input> </form> <ul> <li>...</li> <li>...</li> <li>...</li> <li>...</li> <li>...</li> <li>...</li> <li>...</li> <li>...</li> <li>...</li> <li>...</li> <li>...</li> <li>...</li> </ul> </div> <div id="bg"> <img src="..."> <img src="..."> <img src="..."> <img src="..."> <img src="..."> <img src="..."> <img src="...">

Browser specific CSS padding for firefox field

泄露秘密 提交于 2019-12-30 02:02:05
问题 I have a dropdown list in my application whereby in order to center it I must add padding-top 10px while on Mozilla Firefox but on google chrome it does not need the padding. How can I target the select list to set this browser specific. I was hoping I could have done something like the following: select { -moz-padding-top: 10px; -webkit-padding-top: 0px; } Any ideas of how I could get round this? Fiddle of problem shown below, if you check this in Chrome and then Firefox, I want it so that

Get actual pixel coordinates of div after CSS3 transform

有些话、适合烂在心里 提交于 2019-12-30 01:44:04
问题 Is it possible to get the four actual corner coordinates of a <div /> that has been transformed with CSS3 attributes like scale , skew and rotate ? Example: Before the CSS3 transformation the coordinates are x1y1: 0,0 x1y2: 0,200 x2y1: 200,0 x2yw: 200,200 and the div looks like this: after a little bit of CSS3 magic transform: skew(10deg, 30deg) rotate(30deg) scale(1, 2); it looks like this: How can I get the coordinates (with javascript) of the actual corners (not the bounding box)? Any help

CSS vh units inside an iframe

喜夏-厌秋 提交于 2019-12-30 01:37:30
问题 I'm trying to use CSS vh units inside of an iframe. I'm finding that they are scaled to the size of the iframe somehow. In other words, 100vh isn't the windowheight. It's set to the height of the iframe. Does this seem right? Is there a workaround? 回答1: I know this is an old question, but as people move toward the vh unit, this question will become much more common. To clarify, here's an example of the problem. We have an HTML file that loads an iframe : <!DOCTYPE html> <html> <head></head>

Set a CSS3 transition to none

╄→гoц情女王★ 提交于 2019-12-30 00:14:44
问题 How would I make it so a CSS transition doesn't work inside a media-query, or in any other case? For example: @media (min-width: 200px) { element { transition: width 1s; } } @media (min-width: 600px) { element { transition: none; // SET TO NO TRANSITION } } 回答1: You can set the transition-property to none . This way, no transition effect will be applied. Like this: -webkit-transition-property: none; -moz-transition-property: none; -o-transition-property: none; transition-property: none; 回答2:

CSS RGBA border / background alpha double

北城以北 提交于 2019-12-29 19:51:04
问题 I'm working on a website that has a lot of transparency involved, and I thought I would try to build it entirely in RGBA and then do fallbacks for IE. I need a "facebox" style border effect, where the outer border is rounded and is less opaque than the background of the box it surrounds. The last example from http://24ways.org/2009/working-with-rgba-colour seems to suggest that it's possible, but I can't seem to get it to work. When I try the following: <!DOCTYPE html PUBLIC "-//W3C//DTD

What is a good way to write CSS for multiple borders? [duplicate]

雨燕双飞 提交于 2019-12-29 18:39:11
问题 This question already has answers here : How can I get multiple borders with rounded corners? CSS (8 answers) Closed 8 months ago . I am trying to build multiple borders which are getting faded around the user image. I am writing the CSS like this, but this won't help: width: 90px; border-radius: 50%; box-shadow: inset 0 0 0 4px #eee, inset 0 0 0 8px #ddd, inset 0 0 0 12px #ccc, inset 0 0 0 16px #bbb, inset 0 0 0 20px #aaa, inset 0 0 0 20px #999, inset 0 0 0 20px #888; But it doesn't give the

Styling Twitter's Bootstrap 3.x Buttons

馋奶兔 提交于 2019-12-29 10:27:14
问题 Twitter's Bootstrap 3 buttons are limited in colors. By default there will be 5 7 colors (default primary, error, warning, info, success and link) See: Every button got 3 state (default, active and disabled) How to add more colors or create custom buttons? This question is already answered for Twitter's Bootstrap 2.x: Styling twitter bootstrap buttons. Bootstrap 3 is not backwards compatible. There will be lot of changes in the less and css files. Support for IE7 will be dropped. TB3 is

Can I make an irregular <div> shape using only CSS? [duplicate]

南楼画角 提交于 2019-12-29 09:32:40
问题 This question already has answers here : How can I make a div with irregular shapes with css3 and html5? (4 answers) Closed 2 years ago . I'd like to style a div in the shape of an irregular hexagon with all right angles (think the shape of Utah, but not necessarily that orientation). I've seen some questions on StackExchange regarding irregular shapes for buttons (people say to use an image), and using irregular shapes for triangles (people say to use clipping), but nothing so far on having

Text Shadow in IE 11 not working

强颜欢笑 提交于 2019-12-29 09:17:27
问题 The text in this example of text-shadow doesn't display in IE 11, but does in FF & Chrome. http://codepen.io/maxnguyen/pen/ According to caniuse.com IE has had full support for text-shadow since IE 10. Is there a way to alter the CSS so it would work in IE11? <div id="box"> <p id="flashlight"> <span id="flash">MAX</span> <span id="light">NGUYEN</span> </p> </div> CSS: html { overflow: hidden; /*FF fix*/ height: 100%; font-family: Geneva, sans-serif; background: hsl(210, 30%, 0%) radial