Answers for "css pseudo elements"

CSS
3

pseudo class css

.element:nth-child(1)
.element:hover
.element:visited
Posted by: Guest on October-05-2020
1

after in css

span[data-descr] {
  position: relative;
  text-decoration: underline;
  color: #00F;
  cursor: help;
}

span[data-descr]:hover::after,
span[data-descr]:focus::after {
  content: attr(data-descr);
  position: absolute;
  left: 0;
  top: 24px;
  min-width: 200px;
  border: 1px #aaaaaa solid;
  border-radius: 10px;
  background-color: #ffffcc;
  padding: 12px;
  color: #000000;
  font-size: 14px;
  z-index: 1;
}
Posted by: Guest on December-03-2020
0

css pseudo classes

a:link{
  color: blue;
}
a:visited{
  color: purple;
}
a:hover{
  color: red;
}
a:active{
  color: green;
}


p:first-child{
  background: #05ffb0;
  border: 1px solid;
  padding: 5px;
}

p:last-child{
  background: #05ffb0;
  border: 1px solid;
  padding: 5px;
}

p:nth-child(3){
  background: #05ffb0;
  border: 1px solid;
  padding: 5px;
}

p:nth-child(2n+1){
  background: #05ffb0;
  border: 1px solid;
  padding: 5px;
}
Posted by: Guest on September-06-2021
0

css pseudo classes

/* unvisited link */
a:link {
  color: #FF0000;
}

/* visited 
link */
a:visited {
  color: #00FF00;
}

/* mouse over link */

a:hover {
  color: #FF00FF;
}

/* selected link */
a:active {

  color: #0000FF;
}
Posted by: Guest on May-14-2021
0

css pseudo elements

h2::first-letter {}
p::first-line {}
p::selection {background-color: red;}
::after / ::before
Posted by: Guest on January-05-2021
0

css pseudo classes

button/anchor:hover / :active / :checked
:nth-of-type(3) // select the third element
:nth-of-type(3n) // select an element every three
Posted by: Guest on January-05-2021

Browse Popular Code Answers by Language