css3

How can i position a dropdown at cursor position inside a textarea?

怎甘沉沦 提交于 2019-12-31 23:18:07
问题 How can i position my dropdown at cursor position inside a textarea? I have found this question was already asked here many times but i cant able figure out the correct solution .. this is the JSBIN please help me with your suggestions Thanks in advance 回答1: I know it isn't an exact answer on the question (this solution doesn't use a textarea, but a contentEditable div), but I don't think there is any way of getting x-y-coordinates using either the event, an attribute or function on the

Accurately detect mouseover event for a div with rounded corners

回眸只為那壹抹淺笑 提交于 2019-12-31 22:35:27
问题 I am trying to detect a mouseover event on a circle. I define the circle div like this: .circle { width: 80px; height: 80px; -moz-border-radius: 40px; -webkit-border-radius: 40px; background-color: #33f; } Then I detect the mousover using jQuery like this: $('.circle').mouseover(function() { $(this).css({backgroundColor:'#f33'}); }); This works well, except that the entire 80px by 80px area triggers the mouseover event. In other words, just touching the bottom right corner of the div triggers

Accurately detect mouseover event for a div with rounded corners

狂风中的少年 提交于 2019-12-31 22:35:09
问题 I am trying to detect a mouseover event on a circle. I define the circle div like this: .circle { width: 80px; height: 80px; -moz-border-radius: 40px; -webkit-border-radius: 40px; background-color: #33f; } Then I detect the mousover using jQuery like this: $('.circle').mouseover(function() { $(this).css({backgroundColor:'#f33'}); }); This works well, except that the entire 80px by 80px area triggers the mouseover event. In other words, just touching the bottom right corner of the div triggers

scrolling flex container does not fit centered items [duplicate]

大兔子大兔子 提交于 2019-12-31 21:30:57
问题 This question already has answers here : Can't scroll to top of flex item that is overflowing container (7 answers) Closed 3 years ago . HTML: <div id="container"> <div class="item">Foo</div> <div class="item">Bar</div> </div> CSS: #container { display: flex; justify-content: center; overflow: auto; } .item { flex-grow: 1; min-width: 200px; max-width: 300px; } When the above container shrinks to less than 400px, a horizontal scroll bar appears as expected. However, the first item becomes

Chrome/Safari: box-shadow only appears on text input if border is specified

五迷三道 提交于 2019-12-31 19:27:59
问题 I'm running into a problem with WebKit browsers (Chrome 15.0.x and Safari 5.1.1) where box shadows are not being rendered on text inputs. Just by chance, I discovered that explicitly setting the border causes the box shadow to render, even if you set the border to 'none' or the default, 'inset'. The code below (view it in action on JSFiddle) demonstrated the problem when viewed with Chrome or Safari, but it renders as expected in Firefox 6.0.2 and Opera 11.52. HTML <input type="text" value=

Collapsible lists using HTML and CSS

和自甴很熟 提交于 2019-12-31 18:56:31
问题 I have a collapsible list implemented using HTML and CSS. The list works properly, but I need a little modification. Whenever I click an item in the list it expands. But as I click on another item in the same list, the previously expanded element gets collapsed while the clicked one gets expanded. Please help me to apply the behavior that makes it possible to expand multiple list items at the same time. I want it to be done in HTML and CSS only. Here is the implementation I currently have.

CSS transform on SVG Elements IE9+

廉价感情. 提交于 2019-12-31 17:58:50
问题 Having a SVG Path: <path class='st8' d='M73.4,11.3c-6.3,0-6.4,3.6-6.4,3.6v18c0,0,0.6,3.3,6.4,3.3c5.8,0,6.6-3.3,6.6-3.3v-18 C80,14.9,79.7,11.3,73.4,11.3z M75,31.3c0,0-0.3,1.2-1.6,1.2c-1.3,0-1.4-1.2-1.4-1.2V16.6c0,0,0.3-1.3,1.5-1.3s1.5,1.3,1.5,1.3V31.3 z'/> I have tried to transform it from CSS instead of declaring the transform attribute from the element tag. This process works fine from webkit and firefox, however when testing on IE9 or 10 nothing happens. <svg> <style> .st8 { -webkit

Resize svg image as background in chrome browser

倾然丶 夕夏残阳落幕 提交于 2019-12-31 17:23:17
问题 I am using svg image as background and I am stretching SVG image through background-size. I want it to be strech only width wise. Its working perfectly fine in firefox, IE9 + but chrome. Please suggest me how i can achieve it. .homecallouts ul li { background-image: url('blue_arow_callout.svg'); background-size: 100% 100%; width: 21%; height: 42px; see the jsbin code http://jsbin.com/uvijuc/4/ when i resize in firefox only width stretch but in chrome both width and height are stretching. I

How can I code this awesome glowing border effect with CSS and JavaScript?

﹥>﹥吖頭↗ 提交于 2019-12-31 16:52:33
问题 This form has an awesome effect when you focus on one of its fields: http://labs.dragoninteractive.com/panel/demo/ Any clues on how I can recreate this? Here are a few of my observations: I see they have a giant colorful image here: http://labs.dragoninteractive.com/panel/demo/lib/img/form/map/rmap.jpg When you focus on the form the color seems to fade in (and fades away on blur) I don't know how they are getting the soft edge (glow) using the source image they have I don't know how they are

Put div below navigation bar and don't overlap content

拜拜、爱过 提交于 2019-12-31 13:31:54
问题 My issue is that I fixed a navigation bar at the top of my webpage and it includes both side margins and top one. Below this navigation bar, I want to set an scrollable container. Let me say I'm using Bootstrap 3.2.0 to lay out the site. The issue is that due to the margins of my navigation bar, the content I want to put below overlap the navigation bar and it's shown besides the navigation bar. For a better explanation of this I provide you my code, and a live example: UPDATE: I have noticed