以下のように、htmlに、上に戻るボタンの記述をしましたが、小さな矢印はでますが、それが緑色(#90BE59)のボタンに変りません。見やすい緑色のボタンを表示させるにはどうしたらいいでしょうか?cssの書き方が間違っていますか?宜しくお願いいたします。****\u0026lt;!-- 上に戻るボタン --\u0026gt;\u0026lt;a href=\u0026quot;#\u0026quot; id=\u0026quot;gototop\u0026quot; class=\u0026quot;gototop\u0026quot;\u0026gt;^\u0026lt;/a\u0026gt; \u0026lt;!-- 上に戻るボタンの装飾css--\u0026gt;a.gototop { background-color: #90BE59; bottom: 2%; color: #fff; display: none; font-size: 2rem; height: 3rem; line-height: 3.8rem; position: fixed; right: 2%; text-align: center; text-decoration: none; width: 3rem;}

1件の回答

回答を書く

1084458

2026-01-05 14:10

+ フォロー

さじさん



\u0026gt;・・・・緑色(#90BE59)のボタンに変りません。・・・・・・



特に問題はないようですが。



ご参考に↓

*緑色(#90BE59)を明るくしました。



\u0026lt;!DOCTYPE html\u0026gt;

\u0026lt;html lang=\u0026quot;ja\u0026quot;\u0026gt;

\u0026lt;head\u0026gt;

\u0026lt;meta charset=\u0026quot;UTF-8\u0026quot;\u0026gt;

\u0026lt;style\u0026gt;

a.gototop {

background-color: #0e0; /* 変更 */

bottom: 2%;

color: #fff;

display: block;

font-size: 2rem;

height: 3rem;

line-height: 3.8rem;

position: fixed;

right: 2%;

text-align: center;

text-decoration: none;

width: 3rem;

}

\u0026lt;/style\u0026gt;

\u0026lt;/head\u0026gt;

\u0026lt;body\u0026gt;

\u0026lt;!-- 上に戻るボタン --\u0026gt;

\u0026lt;a href=\u0026quot;#\u0026quot; id=\u0026quot;gototop\u0026quot; class=\u0026quot;gototop\u0026quot;\u0026gt;^\u0026lt;/a\u0026gt;

\u0026lt;/body\u0026gt;

\u0026lt;/html\u0026gt;

うったえる有益だ(0シェアするブックマークする

関連質問

Copyright © 2026 AQ188.com All Rights Reserved.

博識 著作権所有