掲示板

CSS - Text Replace

thumbnail
11年前 に Klee Seubi によって更新されました。

CSS - Text Replace

Junior Member 投稿: 28 参加年月日: 12/06/08 最新の投稿
Hello everybody,

does anyone of you know a CSS code for replacing "text"?

I'm using LR 6.0 and on one page I want to rewrite the text of a tab.

Hope you can help me.

With kind regards,

Klee Seubi
thumbnail
11年前 に Hari Dobbala によって更新されました。

RE: CSS - Text Replace

Junior Member 投稿: 29 参加年月日: 12/11/18 最新の投稿
Hi Klee,

I think using css, it is not possible to replace the text. Generally in this scenarios javascript like jQuery is used as below.

$('.someClassName').text('new text');

But using css, it is possible to add the new content, before or after the old content like...

.someClassName:after {
content: "new content";
}

Hope it may help you.
thumbnail
11年前 に Hitoshi Ozawa によって更新されました。

RE: CSS - Text Replace

Liferay Legend 投稿: 7942 参加年月日: 10/03/24 最新の投稿
CSS is just a stylesheet to specify how an element should appear. It doesn't put or change an element.
That is, you can't replace "text" using css.

Are you trying to replace a string "text" that appears on a page?
thumbnail
11年前 に Klee Seubi によって更新されました。

RE: CSS - Text Replace

Junior Member 投稿: 28 参加年月日: 12/06/08 最新の投稿
Hello everybody,

thanks for the useful info (text before and after).

@ Hitoshi: what do you mean with "string" text?

- Greetings,

Klee Seubi
thumbnail
11年前 に Apoorva Prakash によって更新されました。

RE: CSS - Text Replace

Liferay Master 投稿: 658 参加年月日: 10/06/15 最新の投稿
The only kind of change in text (from the original one) using CSS is the text transform property, as

h1 {text-transform:uppercase;}
h2 {text-transform:capitalize;}
p {text-transform:lowercase;}


Thanks and Regards,
Apoorva Prakash
11年前 に Alex Belt によって更新されました。

RE: CSS - Text Replace

Junior Member 投稿: 49 参加年月日: 12/10/09 最新の投稿
There is one possibility in CSS 3, but it relies on the user having a browser that supports the feature, and you'd have to get the CSS onto the page.

You can read about it here:
http://www.cssportal.com/css-properties/text-replace.htm