pseudo-element

CSS first-letter selection highlighting [duplicate]

喜你入骨 提交于 2019-12-01 02:37:24
问题 This question already has answers here : CSS First Letter Highlighting (2 answers) Closed 6 years ago . Is there any way to highlight the first character of an element that has the ::first-letter pseudo-element applied to it? I'm trying to give the user feedback in regards to a text selection. The text selected is being used for a Twitter plugin and works fine (i.e., the first-letter character is included); however, it doesn't appear as if the text can actually be highlighted. Here's a link

CSS :after pseudo element not showing up on <img>? [duplicate]

半城伤御伤魂 提交于 2019-12-01 02:14:29
This question already has an answer here: CSS :after not adding content to certain elements 3 answers I have an image that kind of slides up from the menu when you hover it. Because it's hidden under the menu i want to give the bottom of the image a little bit of deph by adding a dark fade to the bottom. I figured the best way to achieve this is to use pseudo elements. I don't really care much about IE support as it's such a small detail. So, here's what i've got: .header-section .trygg-ehandel-icon { position: absolute; top: 45px; right: 280px; z-index: 0; display: block; // Stripped out some

Anyone know why this :after CSS isn't working in IE9?

烂漫一生 提交于 2019-12-01 01:57:23
问题 This submit button should be rounded on the left side, and pointed on the right side. It's working in non-ie browsers, but in IE9, it is not working. If I look at the styles in the developer tools, the .flat-button:after rule has everything crossed out, as if it is superseded by something. What? <button type="submit" class="flat-button">Submit</button> <style> .flat-button { float: left; position: relative; border-top-left-radius: 5px; -moz-border-top-left-radius: 5px; -webkit-border-top-left

Checkboxes with Font Awesome 5 icons

吃可爱长大的小学妹 提交于 2019-12-01 01:29:48
问题 Did anyone already designed checkboxes with font awesome 5 icons inside? I've already googled it and found only examples for FA-4 like http://flatlogic.github.io/awesome-bootstrap-checkbox/demo/ I updated to FA5 and got other things with CSS pseudo elements to run, but inside a checkbox it's not running. I'm open to other solutions without pseudo elements. Thanks in advance! Fiddle-Examples: Fiddle with FA-4.7 /* Checkboxes */ .checkbox input[type="checkbox"] { display: none; } .checkbox

:before and :after pseudo elements on html tag is wonky in Chrome

会有一股神秘感。 提交于 2019-12-01 00:40:14
问题 I'm trying to learn how to use the :before and :after pseudo elements. I'm trying to add a black background to the bottom of the page as a sticky footer but it doesn't seem to be working correctly. Basically I have a repeating image as the background of the HTML element and then I add an absolute div positioned at the bottom with a solid black background. I'd just like to point out that this is a learning experiment and not really how I'd achieve the same effect but what I'm trying is working

I want to position a css triangle as a background

旧城冷巷雨未停 提交于 2019-12-01 00:23:35
I want to build the following layout: Preferable i want only use css for that. But even with an background-image i wouldn't know how to build it. I searched the web, but didn't find the help i needed. The Layout contains a div with some text in it. The background-color is a light gray. Then i would love to add a darker triangle background as shown in the picture. This should work as a responsive layout, too. What i tried: # html <div class="wrapper"> <h1>Das ist ein test</h1> <h2>subheadline</h2> </div> #css .wrapper { padding-top: 100px; text-align: center; width: 100%; background-color:

Extracting content in :after using XPath

删除回忆录丶 提交于 2019-11-30 22:08:15
I am trying to get the value of a CSS attribute "content" with: WebElement plusOrMinusSign = currentEntityTypeLevel1.findElement( By.xpath("i[@class='tree-branch-head']::after")); System.out.println(plusOrMinusSign.getCssValue("content")); However, I get an error: The string 'i[@class='tree-branch-head']::after' is not a valid XPath expression. It seem the " ::after " is not recognised. Html: <i class="tree-branch-head" ng-class="iBranchClass()" ng-click="selectNodeHead(node)">::after </i> Css: i:after { content: "-"; } Any idea how to get the value of "content"? gioele You are using By.xpath

z-Index not working on pseudo elements?

不羁的心 提交于 2019-11-30 19:56:30
see: http://jsfiddle.net/Kq2PY/ the div is relative with z-index 5, and the :after thing is absolute with z-index 2. So shouldn't :after be behind the div? You would have to give pseudo elements a negative z-index to get it to go behind it's parent, plus remove the z-index on the parent. http://jsfiddle.net/jklm313/Kq2PY/4/ 来源: https://stackoverflow.com/questions/12463061/z-index-not-working-on-pseudo-elements

Enable support for CSS3 ::outside pseudoelement

流过昼夜 提交于 2019-11-30 17:59:04
I'd like to be able to use the ::outside pseudoelement, but apparently none of the major browsers support it (based on my testing today). Is there some kind of JS polyfill that enables this selector? Or is there a good technique for simulating this? You are correct: no browser in existence has implemented any of the new features in the ancient CSS3 Generated and Replaced Content module , so you won't be able to try the proposed pseudo-elements. In fact, they're planning to rewrite the module itself, so the current working draft should be considered abandoned, and unfortunately there's no

Using attr(data-icon) property to display unicode before element

流过昼夜 提交于 2019-11-30 17:38:32
Lets demonstrate an example with simple HTML code like this: <div data-icon="\25B6">Title</div> I would like this element to have an prefix icon set by it's data attribute (data-icon) so I set CSS file like this: div:before { content: attr(data-icon); } My desired output of this example would look like this: ▶Title Instead of desired output all I can get is this: \25B6Title So my question is: what am I doing wrong / what am I missing? JSFiddle example: http://jsfiddle.net/Lqgr9zv6/ BoltClock CSS escape sequences only work within CSS strings. When you take a CSS escape sequence from an HTML