Is there any way to select/manipulate CSS pseudo-elements such as ::before and ::after (and the old version with one semi-colon) using jQuery?  For example, my stylesheet has the following rule:  .span::after{ content:'foo' }   How can I ch...
Is it possible to change a CSS pseudo-element style via JavaScript?  For example, I want to dynamically set the color of the scrollbar like so:  document.querySelector("#editor::-webkit-scrollbar-thumb:vertical").style.background = localSto...
I'm building React components. I have added CSS inline in the components as suggested in this brilliant presentation by one of the guys behind React. I've been trying all night to find a way to add CSS pseudo classes inline, like on the sli...
I would like to use a switch for the layout of paragraph tags on a webpage.  I use the after pseudoelement:  p:after {content: url("../img/paragraph.gif");}   Now I need to remove this CSS code from the page.  How can this be done easily?  I...
Adding what seems to be an innocuous class to an element having a class containing :first-letter causes the first letter, under some circumstances, to be rendered incorrectly. An element originally has class "unindent", and then class "me...
I have this div with a bunch of other divs and images.  The main div is m-carousel-inner.  What I want to do is select the first img element within this div.  How would I go about doing this in javascript or jquery?   <div class="m-carousel-in...
How can I have the time variable's contents displayed as the content property in my CSS?  JavaScript:  function clock(){     var d = new Date();     var hour = d.getHours();     var min = d.getMinutes();     var time = hour + ":" + min; }...
Considering the following JavaScript, CSS, and HTML codes:    console.log(getComputedStyle(document.querySelector('p'), '::after').getPropertyValue('content')); p::after {     content: "Hello" attr(data-after); } <p...
I want to make rate stars progress bar with single div element and css pseudo elements like ::before.  Only thing what I can't do is manipulating width of ::before element with Javascript.  Here is my example:    .review-rate { 	background-image:...
I have this CSS to define drop areas, where a user can either drop a section before or after existing sections.  .section:before, .section:after {     content: "[insert here]";     height: 64px;     line-height: 56px;     width: 100%;     dis...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.