Home >Web Front-end >HTML Tutorial >How to add a lower border after clicking a link_html/css_WEB-ITnose
Just like the W3C effect without using pictures
a{background:#fff;}a:link, a:visited { background:red;}
a{background:#fff;}a:link, a:visited { background:red;}This one has a red background, I just want a border below it
This one has a red background, I just want a border below it
Set style border-bttom:solid 10px red;
border-bttom:solid 2px red;
Add a div to the outer layer,,,
div:visited{border-bottom:2px;border-color:red;}
Add a div to the outer layer,,,
div:visited{border-bottom:2px;border-color:red;}
<!DOCTYPE html><html><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312"><title>title</title><style>a{margin:20px;padding:40px;width:100px;border-bottom:3px solid transparent;}a:hover{border-bottom:3px solid red;}div{float:left;}</style> </head><body><a>table1</a><a>table2</a><a>table3</a><a>table4</a> </body></html>
Add a div to the outer layer,,,
div:visited{border-bottom:2px;border- color:red;}
<!DOCTYPE html><html><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312"><title>title</title><style>a{margin:20px;padding:40px;width:100px;border-bottom:3px solid transparent;}a:hover{border-bottom:3px solid red;}div{float:left;}</style> </head><body><a>table1</a><a>table2</a><a>table3</a><a>table4</a> </body></html>
What you want is the mouse passing over it. What's more, it jumps after clicking. There is a red border below
This is where the mouse is passing. What I want is to jump after clicking. There is a red border below
Your mouse is passing over this. What I want is to jump after clicking. There is a red border below
You are passing the mouse over this. What I want is to jump after clicking. There is a red border below