pseudo-element

css :hover pseudo-class not working

こ雲淡風輕ζ 提交于 2019-12-08 15:45:11
问题 I've got a CSS :hover pseudo-class that is not producing any results. I was messing around with some image gallery code, and I've managed to get this snippet that doesn't work. I can't figure out why. Some of the weirder CSS rules regarding size here are because these divs normally contain images. I removed the images for simplicity, but left the rules in. Other :hover elements on the same page are working. I'm not sure what else to say about the problem, since this is so basic. I'm probably

Changing border-color on selection

我的未来我决定 提交于 2019-12-08 09:48:34
问题 I'm trying to modify the default selection styles by using the ::selection and ::-moz-selection pseudoelements. I've successfully changed the selection color and background with these two rules: ::-moz-selection{ background: #444; color:#fff; text-shadow: none; } ::selection { background:#444; color:#fff; text-shadow: none; } However, I also need to change the border-color to white on selection for links. I'm trying to accomplish this with this CSS: a::-moz-selection { border-color:#FFF;} a:

Is it possible to use pseudo-elements to make containing elements wrap around an absolutely-positioned element (like a clearfix)?

廉价感情. 提交于 2019-12-08 08:38:53
问题 I am making a lightweight responsive jQuery slider for my site, and am using the very common markup: HTML: <div id="slider"> <ul> <li><img class="active" src="slide1.jpg" alt=""></li> <li><img src="slide2.jpg" alt=""></li> <li><img src="slide3.jpg" alt=""></li> </ul> </div> CSS: #slider { width:80%; max-width:800px; margin:0 auto; } #slider ul { margin:0px; padding:0px; list-style:none; width:100%; } #slider ul li { width:100%; position:relative; } #slider img { width:100%; position:absolute;

Use :first-line pseudo-element as a jQuery selector

时光毁灭记忆、已成空白 提交于 2019-12-08 08:19:29
问题 I know I can use CSS :first-line pseudo-elmenent to target and change style of the first line in any block of text (like in this demo: http://jsfiddle.net/6H8sy/). So the first line can be found and targeted. I was wondering if there's any way to actually select that text to reuse. Something like $(':first-line') (which doesn't work as it is). 回答1: Since you can't select the pseudo element itself, you could replicate the behavior of :first-line , to determine the text. I wrote a quick JS

CSS to specify pseudo element :after following input

为君一笑 提交于 2019-12-08 03:36:43
问题 I have html code that I cannot change. I cannot use JS for help. So the only option is CSS. example here: http://jsfiddle.net/4gKPL/ HTML : <!-- code for input --> <div class="form-group complete"> <label>label for text input</label> <input type="text"/> <span class="error-message">This is an error message</span> </div> <!-- code for dropdown --> <div class="form-group complete"> <label>label for select input</label> <div class="custom-selectbox custom-selectbox-form"> <select name="sth"

CSS :before superscript “6”? [duplicate]

我怕爱的太早我们不能终老 提交于 2019-12-08 03:22:04
问题 This question already has answers here : Superscript in CSS only? (14 answers) Closed 5 years ago . Is there a way to add a superscript "6" into the "content" CSS property for a pseudo element? I've been all over the web, trying different Unicode strings and glyph codes to try to get this to work, but haven't found a solution. Thanks! EDIT: Sorry for not clarifying... I'm needing to put the superscript "6" amongst other text in the same "content" property. Looks like I'll need to just define

Prevent pseudo-element from breaking a line by itself

久未见 提交于 2019-12-07 16:29:21
问题 I have a link style that adds an SVG arrow at the end of the link using &::after . The problem is that when the viewport changes size there are times when just the SVG will break a line. How can I set it up so that the SVG always breaks the line with the last word in the <a> tag? .txtbtn { font-size: 1.125rem; line-height: 1.222222222; letter-spacing: 2.57px; color: orange; text-decoration: none; position: relative; text-transform: uppercase; } .txtbtn::after { position: relative; top: 0;

Is :hover:after supported in IE8?

谁说胖子不能爱 提交于 2019-12-07 16:10:30
问题 I have a flyout menu where at the end of "Quick Links" I use the :after pseudo-element on the first LI tag to display an icon from a sprite file. The HTML: <ul class="rs-quick-links-nav"> <li> <a href="#">QUICK LINKS</a> <ul> <li><a href="#">Enhanced Recipe Search</a></li> <li><a href="#">Recipe Collections & Favorites</a></li> <li><a href="#">Cooking Tips & Techniques</a></li> <li><a href="#">Shopping & Storing</a></li> <li><a href="#">Tools & Products</a></li> <li><a href="#">New Uses for

What is the element type of pseudo-elements?

£可爱£侵袭症+ 提交于 2019-12-07 06:09:01
问题 <pseudo> </pseudo> ? The pseudo-elements of CSS are not in the DOM. But internally they must be equivalent to some kind of generic HTML element, since they can be styled, can be visible, and they affect the page flow. What is the element type of a pseudo element? And can we programmatically create them, without using CSS? 回答1: Pseudo-elements have no element type as far as the document language is concerned because, as you state, they don't exist in the DOM, and as can be inferred from the

Difference between Scrapy selectors “a::text” and “a ::text”

元气小坏坏 提交于 2019-12-07 05:02:27
问题 I've created a scraper to grab some product names from a webpage. It is working smoothly. I've used CSS selectors to do the job. However, the only thing I can't understand is the difference between the selectors a::text and a ::text (don't overlook the space between a and ::text in the latter). When I run my script, I get the same exact result no matter which selector I choose. import requests from scrapy import Selector res = requests.get("https://www.kipling.com/uk-en/sale/type/all-sale/