LoginSignup
3

More than 5 years have passed since last update.

posted at

CSSでタグ内のテキストを書き換える

概要

プラグイン等を使用していると、html側から編集できなかったりします。
そんなときにこの方法で、CSSからテキストを書き換えることができます。

#loginname {
    font-size:0;
}
#loginname:before {
    font-size: 14px;
    content: "ユーザ名";
}

説明

まず元からあるテキストを消します。
そして新しくフォントサイズを指定。
contentで書き換えるテキストを指定。
以上です。
とても簡単!

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
What you can do with signing up
3