How to set a External SVG color in HTML using CSS?


Tags: javascript,html,css,css3,svg

Problem :

I am trying to use SVG on my web page.

But it's color is black. So, I want it to be changed. So, I have done-

.red_color_svg
{
    color: red;
    border: 5px solid currentColor;
    fill: currentColor;
}
<object type="image/svg+xml" data="http://abrar.blockhunt.com/public/svg/heart_border.svg" class="weather_icon red_color_svg circle"></object>

To import heart_border.svg file and make its color red. But it does not work as you see i the output.

Can anyone help me please to solve this?

Thank you very much in advance for helping.



Solution :

I have found a solution for this.

The solution is given in here.


    CSS Howto..

    CSS: How do I 'raise' the last photo in this page?

    How to place circle and text in one line?

    how to place the images exactly in menu position

    How to make box light up in navigation bar - CSS

    How to make circles repeat in the background of an element in full CSS?

    How to combine transforms in CSS?

    How do I add a special CSS class to run only on IE for a div component?

    How to use bootstrap css tables to display data from MySQL tables?

    How to align links on top of each other inside of a box with CSS?

    How can I apply percentage-based positioning to background-image sprites with pure CSS?

    How to get a white outline around an image in CSS

    How to reveal content behind a div with pure css?

    Can't get table to show up using HTML and CSS

    how to make an empty span collapse

    How to override previous onClick css class change (jQuery)

    How to horizontally center two divs within a header div?

    How to change format of long text in cell?

    How to align slideshow element below header?

    How to use @page CSS in ASP.NET MVC View

    How to add a line break
    in
    in HTML

    How to keep two input box side by side in html using CSS?

    Selenium how to access two controls of same css class

    How to Detect css by iPhone/iPad

    How to show middle of image in div using css?

    How do I make a container div only overflow horizontally without using “display:inline-block” for its inner divs?

    why there is opacity on image how to put no opacity on image and put hover function on div?

    how to position a div below an absolute div in css

    How to style a built-in comment box imported from a third party?

    CSS question. How can I get blueprint css to work rails tabnav widget?

    Why doesn't this site have a Google logo for their use of Google Maps? I want to do this. How? [closed]