You can’t fade the opacity of an element, without having what’s behind showing through.
The site you linked to isn’t fading the opacity of the image, but introducing a translucent layer over the top with the text in.
If you just want to fade the image, but not have the background show through, you could put a wrapper around the image with a solid background colour. But there’s no way to fade an image and not have what’s behind show through.
.container { background:#FFF; } .container img:hover { opacity:0.8; }
Related Posts:
- CSS Background Opacity [duplicate]
- CSS opacity only to background color, not the text on it?
- Using CSS for a fade-in effect on page load
- How to vertically align an image inside a div
- How to change text transparency in HTML/CSS?
- Change color of PNG image via CSS?
- css transition opacity fade background
- Can you set a border opacity in CSS?
- Define an
‘s src attribute in CSS [duplicate]
- How to place Text and an Image next to each other in HTML?
- Adding a blurred border in CSS
- Contain an image within a div?
- CSS force image resize and keep aspect ratio
- How to change the background colour’s opacity in CSS
- How can I fill a div with an image while keeping it proportional?
- Removing whitespace between HTML elements when using line breaks
- How to get multiple images to auto resize and stay centered within a div
- What’s the difference between SCSS and Sass?
- How am I supposed to use index.html?
- Column order manipulation using col-lg-push and col-lg-pull in Twitter Bootstrap 3
- What is the difference among col-lg-*, col-md-* and col-sm-* in Bootstrap?
- Adding border to SVG image
- What does !important mean in CSS?
- Set line spacing
- CSS Background Opacity [duplicate]
- Remove blue underline from link
- Outline effect to text
- Customize Bootstrap checkboxes
- Making a
- React.js inline style best practices [closed]
- What is a user agent stylesheet?
- What is a user agent stylesheet?
- Is there a CSS parent selector?
- CSS to make HTML page footer stay at bottom of the page with a minimum height, but not overlap the page
- Vertically align text within a div
- How to align a to the middle (horizontally/width) of the page [duplicate]
- Animate the overflow property
- Embed image in a
- Is there a color code for transparent in HTML?
- multiple classes on single element html
- How do I center floated elements?
- create a white rgba / CSS3
- Gradient borders
- Superscript in CSS only?
- What is WebKit and how is it related to CSS?
- Transparent CSS background color
- What’s the difference between display:inline-flex and display:flex?
- Making an iframe responsive
- How can I invert color using CSS?
- How to insert spaces/tabs in text using HTML/CSS
- font-family is inherit. How to find out the font-family in chrome developer pane?
- How to get these two divs side-by-side?
- Is
element block level or inline level?
- How can I vertically center a “div” element for all browsers using CSS?
- How do I auto-resize an image to fit a ‘div’ container?
- What does auto do in margin: 0 auto?
- Does bootstrap have builtin padding and margin classes?
- How to change the color of an svg element?
- Changing spacing between paragraphs and inside of paragraphs
- Is there a color code for transparent in HTML?
- How can I center an absolutely positioned element in a div?
- CSS Display an Image Resized and Cropped
- Nesting CSS classes
- How to place a text next to the picture?
- Applying Comic Sans Ms font style
- How to set up fixed width for
? - CSS: Moving the text down a few pixels but keeping the background still?
- “Stray start tag footer” in html validator?
- How to change btn color in Bootstrap
- Make div scrollable
- Failed to decode downloaded font, OTS parsing error: invalid version tag + rails 4
- Chrome give error **Failed to load resource: net::ERR_NAME_NOT_RESOLVED** while other browser load images
- What is the difference between the selectors “.class.class” and “.class .class”?
- CSS: Creating textured backgrounds
- Insert image after each list item
- How to make the HTML link activated by clicking on the
- ?
- How do I hide the bullets on my list for the sidebar?
- limitations of using @Html.EditorForModel
- Transition of background-color
- How to implement max-font-size?
- Bootstrap 4 images thumbnail classes
- How to float 3 divs side by side using CSS?
- How to override the properties of a CSS class using another CSS class
- HTML Width Percentage
- CSS: Moving the text down a few pixels but keeping the background still?
- How to darken a background using CSS?
- Circle button css
- force footer on bottom on pages with little content
- draw diagonal lines in div background with CSS
- How to add a color overlay to a background image?
- CSS Background image not loading
- How to “crop” a rectangular image into a square with CSS?
- Better way to set distance between flexbox items
- Text-decoration: none not working
- How to set up fixed width for
? - How do I center an h1 in the body
- CSS3 Transition not working
- In CSS what is the difference between “.” and “#” when declaring a set of styles? [duplicate]
- How do I rotate text in css?
- CSS Invalid Property Value?