css :active pseudo-class usage

The :active selector is a CSS pseudo-class. It represents an element that is being activated by the user when they are interacting with a button or link.

HTML

<a href='#' class='test-link'>I'm a Test Link - Click to show the active state change</a>

CSS

a.test-link {
	border-radius:3px;
	padding:10px 20px;
	color:#FFF;
	background: linear-gradient(90deg, #0fa7d9, #2c3590);
	display:inline-block;
}
a.test-link:active {
	background: linear-gradient(0deg, #0fa7d9, #2c3590);
}

External Link for css :active pseudo-class usage

Other Items in css
Page Views

This page has been viewed 328 times.

Search Code
Search Code by entering your search text above.
Welcome

This is my test area for webdev. I keep a collection of code snippits here, mostly for my reference. Also if i find a good site, i usually add it here.

âĪðŸ‘Đ‍ðŸ’ŧðŸ•đ

Random Quote
Old programmers never die; they just lose some of their functions.