マウスを乗せるとリンク文字に下線が出る


マウスを乗せると下線が表示されます

下記のタグをコピーして<head></head>の間に入れます。
黄色の部分(#色)を自分の好きな色に変えて下さい。

<style type="text/css">
<!--
a:link {
text-decoration:none;
color:#0033cc;
}
a:visited {
text-decoration:none;
color:#0033cc;
}
a:active {
text-decoration:none;
color:#0033cc;
}
a:hover {
text-decoration:underline;
}
-->
</style>

html ↓↓

<a href="リンク先url">ここへリンク文字やリンク画像</a>

下線を点線にする場合

下記のタグをコピーして<head></head>の間に入れます。
黄色の部分(#色)を自分の好きな色に変えて下さい。

<style type="text/css">
<!--
a:link {
text-decoration: none;
color: #0033cc;
}
a:visited {
text-decoration: none;
color: #0033cc;
}
a:active {
text-decoration: none;
color: #0033cc;
}
a:hover {
border-bottom-style: dotted;/*点線の種類*/
border-bottom-color: #333333;/*点線の色*/
border-bottom-width: 2px;/*点の大きさ*/
color: #0033cc;
}
-->
</style>

下線を出したくない場合は text-decoration: none;
下線を出したい場合は text-decoration: underline;

link 未訪問のリンク
visited 訪問済みリンク
active リンクをクリックしたとき
hover マウスが乗ったとき

リンクの開き方(ターゲット)

<a href="http://yume.hacca.jp" target="_blank">サンプルページ</a>

ターゲットtarget はリンク表示(リンクの開き方)の方法です。上記のソースは新しいウィンドウで開きます。

ターゲットの種類

target="_blank" 新しいウィンドウで開きます
target なし 同じページで開きます
target="_top" 全てのフレームを解除して画面全体を表示
target="_self" 同じウィンドウ(フレーム)に表示
target="_parent" 親フレームに表示します。
target="フレーム名" フレームから別フレームに表示します

関連項目・関連ページ

同じページ内や他のページの任意の場所へリンク

●当サイトのソースは、IE6.0+のみ動作確認をしております。 それ以外のブラウザでは正しく作動しない場合がございます。ご了承下さい。