change text of element css code example

Example 1: css change text

IDENTIFIER {
	visibility: hidden;
	position: relative;
}
IDENTIFIER::after {
	visibility: visible;
	position: absolute;
	top: 0;
	left: 0;
	content: "NEW_CONTENT";
}

Example 2: change text in a div css

button {
  visibility: hidden;
}
button:after {
  content:'goodbye'; 
  visibility: visible;
  display: block;
  position: absolute;
  background-color: red;
  padding: 5px;
  top: 2px;
}

Example 3: change text in a div css

.pvw-title span {
  display: none;
}
.pvw-title:after {
  content: 'whatever it is you want to add';
}

Tags:

Css Example