RanjithKumar SV
RanjithKumar SV

Reputation: 225

How to add new Icon to CSS class for HTML element

I would to add my Icon from another link to HTML element, and its clickable.

The icon associated with class, class name icon.

How to add my icon to HTML element, like this

<a href="#" class="icon" title="shareStatus"></a>

Note: I need to take icon from another source.

Your suggestion will be advisable

Upvotes: 1

Views: 1294

Answers (1)

Sebastian Brosch
Sebastian Brosch

Reputation: 43564

You can use a solution like the following, using a background image:

.icon {
  content:"";
  width:50px;
  height:50px;
  background:url('http://placehold.it/50x50');
  display:inline-block;
  border-radius:50%;
}
<a href="#" class="icon" title="shareStatus"></a>

Upvotes: 1

Related Questions