pseudo-class

How to add class or pseudoclass programmatically to custom control in JavaFX?

末鹿安然 提交于 2020-01-04 02:42:24
问题 In JavaScript world it is often set element class to denote it's appearance, which is later defined by CSS. Is this so in JavaFX? For example, what if I want to color negative value in red in TableView cells? I would not code color directly, but assigned some class to a cell, like "negative" and later would color it into red with CSS . I found PseudoClass class. Is it intended for this? It is marked "since 8", so is there any more mature API for this? 回答1: If you want to add a style to a Node

css “:focus” pseudo-class and selectors

最后都变了- 提交于 2020-01-03 04:22:27
问题 I've been battling to get this right...basically I have the following HTML setup: <div class="box10"> <span class="label01">Name:</span> <input class="tboxes" type="textbox" /> </div> "span.label01" is an inline element, and appears to the left of the textbox "input.tboxes". What I am trying to do attach some style to "span.label01" AND "div.box10" when the textbox receives focus. I have tried the following CSS code: input.tboxes:focus span.label01 { color:#FF9900; ... } but nothing happens.

css “:focus” pseudo-class and selectors

半腔热情 提交于 2020-01-03 04:22:08
问题 I've been battling to get this right...basically I have the following HTML setup: <div class="box10"> <span class="label01">Name:</span> <input class="tboxes" type="textbox" /> </div> "span.label01" is an inline element, and appears to the left of the textbox "input.tboxes". What I am trying to do attach some style to "span.label01" AND "div.box10" when the textbox receives focus. I have tried the following CSS code: input.tboxes:focus span.label01 { color:#FF9900; ... } but nothing happens.

How do I inspect CSS pseudo classes with firebug?

耗尽温柔 提交于 2019-12-31 17:52:21
问题 I am struggling with a reluctant a:hover css style which I cannot override. I tried to inspect the element in Firebug, but I cannot see why it won't work. I don't even see how to properly inspect a:hover css event in Firebug. I have seen: Hover Inspection in Firebug http://blog.borngeek.com/2010/04/16/hover-inspection-in-firebug/ but I have not figured out how to reproduce the steps mentioned there. Also: Pseudo-Phantoms http://meyerweb.com/eric/thoughts/2009/11/03/pseudo-phantoms/ How do I

Underlining in Javascript?

陌路散爱 提交于 2019-12-31 04:12:13
问题 Upon the realization that you can't have an inline pseudoclass -- How to write a:hover in inline CSS? -- I looked into having Javascript do the same job with the onMouseOver and onMouseOut events to simulate the :hover pseudoclass. I'm trying to remove the underline from the text when the mouse is above it. Is there a snippet of Javascript someone can offer that can do that? I tried onMouseOver="this.style.textDecoration="none"" , but I think the contrasting quotations are throwing everything

What's the :any-link pseudo-class for?

坚强是说给别人听的谎言 提交于 2019-12-30 03:09:46
问题 I don't know if it's a part of any standard, but at least two major browsers have implemented it: :-webkit-any-link in Chrome :-moz-any-link in Firefox I can't find any documentation for it. I would like to know its purpose, browser support, and examples of usage. 回答1: :any-link is a new pseudo-class proposed in Selectors level 4, that matches all elements that would be matched by :link, :visited . From what I see, its main purpose is to simplify selectors that need to select any hyperlinks,

:before pseudo-class doesn't work with images

坚强是说给别人听的谎言 提交于 2019-12-29 08:35:07
问题 I have following HTML: <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>:before pseudo-class and images</title> <style type="text/css" media="screen"> img { display: block; width: 640pt; } img:before { content: "Test"; } </style> </head> <body> <img src="http://andreygromov.name/picture/flower/flower4.jpg" alt="Ваза с цветами" /> </body> </html> :before will not appear for image, but it does for any div. Why? Update: I found this explanation in W3C: Note. This specification does

CSS-Less class extend class with pseudo class

六眼飞鱼酱① 提交于 2019-12-29 05:13:06
问题 I was wondering how I could do something like the following with less css: .btn { color : black; } .btn:hover { color : white; } .btn-foo { .btn; &:hover { .btn:hover; } } Of-course this is just an example, what need to point is if there is any way to extend the pseudo-class in order to avoid re-type the properties of :hover pseudo class everywhere I need them. I know I could create a mixin for that but I'm wondering if I could avoid it. Thanks 回答1: UPDATE: If you can't modify external files

:last-child pseudo class selector in CSS and Internet Explorer

笑着哭i 提交于 2019-12-28 13:55:34
问题 I have the following code: ul.myList li{ border-right: 1px dotted #000; } However, on the last element, I need to remove that border as the design that I am working from dictates that the last item does not require a border as a separator. So, I need to target the last child of a list and so within my css I have added ul.myList li:last-child{ border-right: none; } Which as we all know, works fine in Firefox, Safari and Chrome. The problem lies when we view the page in Internet Explore 6

Is it possible using current browsers to use pseudo-classes to detect first and last of a certain class?

浪子不回头ぞ 提交于 2019-12-28 07:03:21
问题 If you have the HTML: <section class="column"> <p> Some Test </p> <p> Some Test </p> <p> Some Test </p> </section> <section class="column"> <p> Some More Test </p> <p> Some More Test </p> <p> Some More Test </p> </section> <section class="someotherclass"> <p> Some More Test </p> <p> Some More Test </p> <p> Some More Test </p> </section> and CSS: .column:last-child { background:red; } http://jsfiddle.net/WYu24/ Is there a way to make the :last-child selector pick up the last occurrence of a