How do I style an img with CSS3 - image

is it possible to change the background-color of e.g. the first icon of this site with CSS3, or WebKit’s CSS extensions?
I'm new to this and would appreciate some help. A link or an example would be great.
Thank you in advance.

Although you can style an Image, but changing color of Icon is not possible in CSS3 as it requires Blending modes.
You can achieve this with HTML5 Canvas
// Color
var over = someCanvas.getContext('2d');
// Icon
var under = anotherCanvas.getContext('2d');
over.blendOnto( under, 'screen', {destX:30,destY:15} );
use https://github.com/Phrogz/context-blender for achieving this.

If the icon image had a transparent background, then you could set the CSS background colour behind the image like this:
background: #c00 url(kombine-iphone-icons.png); /* Puts a red background behind the icon image */
Unfortunately, there’s nothing in CSS 3 (or any of WebKit’s CSS extensions) that lets you change the colour of images.

Try
img {
background-color: #FF00FF;
}

Yes, you can style an image with css3. But something tells me that you question is actually more specific that it looks like..

Related

FIlepond Image preview background color

Is there a way to change the default background color used when displaying initial image files in Filepond? Currently, the images are resized to fit into the control with the extra background space using black. I can get standard file types to display with a different background color but not with images.
I have tried to modify the css but not having any luck.
You need to set a background color to the div with class name filepond--image-preview.
.filepond--image-preview {
background: red;
}
Please note that to override the original selector you have to load this one after loading the image preview styles OR make the selector more specific:
.filepond--root .filepond--image-preview {
background: red;
}
there are instruction on how to override the styles in the documentation: https://pqina.nl/filepond/docs/api/style/#fonts-and-colors
and here is the css you may been looking for:
[data-filepond-item-state='processing-complete'] .filepond--item-panel {
background-color: red;
}

Is it possible to style the color of the font?

I would like to change the default black color of the font to white. I tried to add this to the styling section of my graph:
style request-rejected fill:#e74c3c,color:#FFFFFF;
The background is correctly changed to #e74c3c but the font stays black. It looks however that normal CSS styles are used in the .less source.
Is it possible to change the font color in a graph?
I know that this is a SUPER old post - but just in case someone else ends up here...
Please see Mermaid documentation for information on styling

Lighten an image on hover

I'm setting up a portfolio webpage, and I want the images to be coloured with a colour from the logo 50% solid until mouseover, which makes the colour fade out and reveal the image properly.
Here's the site so far; www.cmvisual.com
Anybody know how to do this?
It seems like you probably want to put a div with a background color and partial opacity
over the image, and then use a CSS transition (preferably) or Javascript to animate the transition.
Maybe start at half opacity, then go to 0 opacity on rollover.
What you REALLY want is CSS blend modes, but that isn't fully supported yet.

Hover on image a

I am making a website in Joomla.
And on my front page I have some images, which are links.
I want these images a's to get a slightly green effect, like opacity + green and stil have the original images below.
Is this possible to do with only css?
I can get the opacity to work, but not the green color.
Hope some one can help me.
Here is my site. it is the the small images under "Referencer" and "Nyheder"
This is doable with CSS. The main trick is that the links currently aren't surrounding the img block because their display type is inline.
Assuming the following HTML:
<img src="..." />
This is the CSS you need:
a.greenish {
background: green;
display: inline-block;
}
a.greenish img {
opacity: 0.5;
}
Adjust green and opacity to taste, obviously.
See this lovely jsfiddle for an example. Note that this includes addition CSS in case you only want it to turn green when hovered.
You won't be able to do what you want with pure CSS easily. There is no "overlay" in CSS. You can manipulate the background color/opacity, but the image would always be on top of that so it would not achieve the effect you want.
What you will need to do is to make the image the background of the A, then change the background do a similar image with the effect already applied. The images are small so you could easily make them sprites with the over look all in the same image. I did exactly this on the social icons at the top of my company website - http://www.bnrbranding.com/

Scrolling & zooming SVG Viewer on Windows?

We need to view some very large (7200+ pixels) SVGs. Every SVG viewer I've found, including modern web browsers, does not allow us to view the entire image. There aren't any scrollbars, and we do not have the option to zoom.
Is an open source / free application available that could help with viewing the entire SVG image? Thanks!
If you really do mean SVG, Inkscape should work.
You need to add viewBox attribute to the <svg> element and wievers will scale the image to the available viewport.
<svg viewBox='0 0 7200 7200' ... >
You may want to try Opera SVG Viewer to preview multiple svg files at once.
If you use a custom css browser extension such as Stylus, you can set up a CSS style for overflow on the root element, which should be <svg>:
:root {
overflow:auto !important;
}
This is pretty harmless for any html page but you can have it only apply to .svg urls via the url regex filter:
^.*[.]svg$
Now with this in place, opening an svg in a new tab will apply the style and allow you to scroll around. Zooming in and out should automatically adjust scrollbars.

Resources