style after code example

Example 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;
}

Example 2: css after in javascript

<!DOCTYPE html>
<html>
<head>
<style>
p::after { 
  content: " - SAMS TEAM";
}
</style>
</head>
<body>

<p>WE LIVE IN INDIA</p>
<p>WEB</p>

</body>
</html>

Tags:

Misc Example