ÇÓÊÈÏÇá äÕ ãßÇä äÕ ãä ÎáÇá how to replace word with css
How to Replace Text with CSS pseudo-elements :before/:after
How do I replace a word in some text using CSS?
Best way to replace a text using CSS
hide the original content and replace it with a pseudo-element
(::after or ::before).
----------------------------------------------------------------
ãËÇá:
----------------------------------------------------------------
ÇÐÇ ßÇä áÏíß ßáãÉ ÈÇÓã Hello æÊÑíÏ ÊÛííÑåÇ Çáì
Goodbye ãä ÎáÇá ßæÏ css
ßæÏ:
<button>Hello</button>
ÇáÍá :
ßæÏ:
button {
visibility: hidden;
}
button:after {
content:'Goodbye';
visibility: visible;
}
----------------------------------------------------------------
ãËÇá ÇÎÑ:
----------------------------------------------------------------
ÇÐÇ ßÇä áÏíß ßáãÉ ÈÇÓã
ABC æÊÑíÏ ÊÛííÑåÇ Çáì
DEF ãä ÎáÇá ßæÏ css
ßæÏ:
<div class="pvw-title"><span>ABC</span></div>
ÇáÍá :
ßæÏ:
.pvw-title span {
display: none;
}
.pvw-title:after {
visibility: visible;
}
----------------------------------------------------------------
ÇßæÇÏ ÇÎÑì :
----------------------------------------------------------------
ßæÏ:
.element {
text-indent: -9999px;
line-height: 0; /* Collapse the original line */
}
.element::after {
content: "New text";
text-indent: 0;
display: block;
line-height: initial; /* New content takes up original line height */
}
ßæÏ:
button {
position: absolute;
visibility: hidden;
}
button:before {
content: "goodbye";
visibility: visible;
}
ßæÏ:
span {
visibility: hidden;
word-spacing:-999px;
letter-spacing: -999px;
}
span:after {
content: "goodbye";
visibility: visible;
word-spacing:normal;
letter-spacing:normal;
}
ßæÏ:
.company-name{font-size: 0}
.company-name:after{
content: "New Company Name";
font-size: 14px;
}​
ÇáãÑÌÚ:
https://stackoverflow.com/questions/...-text-with-css
https://stackoverflow.com/questions/...ic-text-in-css
https://stackoverflow.com/questions/...text-using-css
ÇáãÝÖáÇÊ