how to make background blur effects using only css3 and html5? - html

How to do i make blur background exactly like this image using only css3 html5 See the background

use filter property in css
.blur{
-webkit-filter: blur(10px);
filter: blur(10px);
}
<img src="http://placekitten.com/g/500/500" class="blur" width="200px">
<img src="http://placekitten.com/g/500/500" class="" width="200px">

Related

How can i place 1 to 5 images on top of another image? [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 5 years ago.
Improve this question
As a user of a program selectes from one to five images, i want these images to be placed on top of another image as seen below. The image in the background is one long image in light gray, and the one to five on top are in black.
when i add any any ONE of the five images, the image on top is placed correctly
But when i select more than one image, the position of the 2-3-4-5 image is not correct:
This is my code, and the images are placed in a html table cell
<td><img src="backgroundimg.gif">
<img src="img1.gif" style="right:333;position:relative;z-index: 1;">
<img src="img2.gif" style="right:214;position:relative;z-index: 1;">
<img src="img2.gif" style="right:154;position:relative;z-index: 1;">
<img src="img2.gif" style="right:95;position:relative;z-index: 1;">
</td>
I dont have access to the css files, so the css have to be inline....
Thanks in advance
something like this?
$('input:checkbox').change(function(){
if($(this).is(":checked")) {
$('div').removeClass("grey100");
} else {
$('div').addClass("grey100");
}
});
.grey100 {
-webkit-filter: grayscale(100%);
-moz-filter: grayscale(100%);
-o-filter: grayscale(100%);
-ms-filter: grayscale(100%);
filter: grayscale(100%);
opacity: 0.5;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<div class='grey100'>
<img src="https://res.cloudinary.com/rss81/image/upload/gw.jpg">
<input type="checkbox" >
</div>
Take a look at this and see if it's what you're looking for:
$('input:checkbox').change(function() {
$(this).parent().find('img').toggleClass("grey100");
});
.grey100 {
opacity: 0.5;
}
img{
width:100px;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<div >
<table>
<tr>
<td>
<img class='grey100'src="https://res.cloudinary.com/rss81/image/upload/gw.jpg"><br>
<input type="checkbox" >
</td>
<td >
<img class='grey100'src="https://res.cloudinary.com/rss81/image/upload/gw.jpg"><br>
<input type="checkbox" >
</td>
</tr>
</table>
</div>

cross browser embedded video grayscale filter

On my page I am embedding a video from vimeo as so
<h4>Favopurite songs</h4>
<ul>
<li>
<a href="https://player.vimeo.com/video/9159308?autoplay=1" target="vimeoPlayer">
Three little birds
</a>
<li>
</ul>
<section id="player">
<iframe class="first" src="#" name="vimeoPlayer" width="200" height="150"
frameborder="1" webkitallowfullscreen mozallowfullscreen allowfullscreen>
</iframe>
</section>
For the css I have
iframe {filter: grayscale(100%)}
This is working in all browsers but not internet exploere 11.
I am aware that since internet exploere 10 they removed the filter property.
I have come across multiple fiddles that are suggested for images and that have hover effects over them.
I am purely looking to add a greyscale filter to my embedded videos without any hover effects and some of the fiddles I found wont work with embedded video.
any help would be greatly appriciated, Thanks
use this for different browsers
iframe{
-webkit-filter: grayscale(100%);
-moz-filter: grayscale(100%);
-ms-filter: grayscale(100%);
-o-filter: grayscale(100%);
filter: grayscale(100%);
}
now test in IE11.
if IE 11 doesn't support css filters, you have to use a javascript solution to do the same thing.
cross browser grayscale
That link explains the process in detail, using modernizer to detect browsers and so on. It'd be a lot of work to implement though.

How do I make my image cover the background html?

I want to make my image a cover background, but it doesn't work for me. Here's my code:
<b>
<div id="feedicon" style="display:none; z-index:0;position:fixed;width:32px;height:32px;top:250px;left:0px;">
<a href="http://www.willmaster.com/index.xml" target="_blank">
<img src="http://www.willmaster.com/images/feed-icon32x32.png" border="0" width="32" height="32" alt="RSS" title="RSS">
</a>
</div>
</b>
Try this:
h1
{
color:White;
}
.fullBack
{
background-image:url('http://www.willmaster.com/images/feed-icon32x32.png');
background-size:cover;
width:100%;
height:100%;
}
<div class="fullBack">
<h1> some content here </h1>
</div>
using the background-size you can change the image size in a page to cover the entire page. This is a good tutorial to learn how to use that attribute wisely if you wish for a cover background image.
EDIT - It's important to remember that background-size is a css3 trait - so use it with caution, as it might not work well with old browsers.

How to change an image <img> on mouse rollover (hover)

How can I change an image (set using <img> tag, which is not a <div> or <some_selector> background, that can be easily solved by changing background or background-image attribute on :hover in CSS) on mouse rollover (hover) like the favorite tag remove button in stackoverflow homepage, in which the (X) image becomes red on hover ?
HTML
<div id="css-image-swap-1">
<img id="swap-1" src="default-image-url" alt="CSS image swap" />
</div>
CSS
#css-image-swap-1{
width:300px; height:150px; background:url(swap-image-url);
}
#css-image-swap-1 img:hover{
opacity:0;
}

CSS3: Use On-hover Event to Set Semi-transparent Overlay on an Image

I need an on hover semi-transparent div which causes some text to appear over the top of a thumbnail image? Is it possible to do this without using JavaScript and using just Cascading Style Sheet?
You can try something like this:
<style type="text/css">
.thumb {position:relative;width:200px;height:20px;}
.thumb:hover .overlay {opacity:0.5;}
.overlay {position:absolute;top:0;left:0;width:200px;height:20px;background:#fff;opacity:0;}
</style>
<div class="thumb">
<div class="overlay"></div>
<img src="image.gif" />
</div>
Ok ok I know this is old but i ran into and have something to add about opacity settings
http://deepubalan.com/blog/2010/03/29/rgba-vs-opacity-the-difference-explained/
give that a look over, I find using rgba when ever possible over opacity procuces a much better result, opacity can work funny in different browsers and cause all manner of asthetic problems...
just my 2 cents
Depending on what you're doing with the thumbnail, you could set the background of the DIV as the image, include the text, and use CSS to toggle the visibility from transparent to solid on hover.
This'd only work cleanly if you have a known-size thumbnail (because it's hard to autosize a div to the size of its background image), but it'll make for a simple solution in your html:
<div class="thumb" style="background-image: url(thumb.jpg);">
<p>mouseover text</p>
</div>
The important css would be something like this...
div.thumb p { visibility: hidden; }
div.thumb:hover p { visibility: visible; }
Not sure from your question whether the whole div is supposed to be transparent or just the text, but you can apply the relevant CSS at either level.