This question already has answers here:
Creating a Zoom Effect on an image on hover using CSS?
(13 answers)
Closed 8 years ago.
I am making a Gallery for my site. In my site, I am going to have my pictures set out like THIS. But, what I want to know is how to make it zoom in when I hover over it. Not like a magnifying glass, just make the image bigger by 5 to 10%.
Use CSS3 Transform as shown here:
http://css-tricks.com/snippets/css/scale-on-hover-with-webkit-transition/
Also include the -moz-, -o-, -webkit-, -ms- counterparts of transform for browser compatibility.
Using CSS3 Transitions and background-size property using percentages
http://www.w3schools.com/cssref/css3_pr_background-size.asp
Related
This question already has answers here:
disable subpixel aliasing on html/css borders
(4 answers)
How to stretch images with no antialiasing
(5 answers)
Closed 1 year ago.
I have a problem with anti-aliasing (I guess) in css.
I've seen how to disable it on fonts and images but I'm having troubles with some borders...
Here's the thing, I have a canvas wrapped by two divs, in a grid display. It renders nicely sometimes but with certain levels of zooms, a gray line appears next to borders. I figured out it was because of anti-aliasing but I can't find a way to disable it.
With anti-alliasing
What I would like to be always there
This question already has answers here:
Shape with a slanted side (responsive)
(3 answers)
Closed 4 years ago.
Im trying to figure out how to solve this but i couldn't find a good option for .
Im trying to describe my problem with 2 pictures.
Im here to learn. Negative reputation doesn't help without saying anything :).
can i do this with pure css or bootstrap??
Also want it responsive.
First picture
Second Picture
Yes, It is possible with pure CSS.
In CSS you have to use :After & :Before for making shapes that you have mentioned.
For making it responsive simply use Flex-box grid.
This question already has answers here:
CSS Sprites and repeating backgrounds
(2 answers)
Closed 7 years ago.
Using css sprites for icon-style images is best practice by now and pretty easy.
Using multiple repeating backgrounds in one image is traditionally only possible if they either use only vertical or horizontal repeat.
Or is it? Meanwhile with css3 and html5 and all stuff, is there a way to combine multiple background images in one css sprite to make an background pattern and use vertical and horizontal repetition?
Edit/Note: I know this is not the first time such a question is asked. But most/all answers I found are some time ago. I'm just wondering if there is a solution today.
Edit: To illustrate what I'm looking for: http://ibin.co/21LqyJvnGdMB
Yes you can use css sprites for repeating background.
The rule is pretty simple: if you want the background to repeat
vertically (top to bottom), place the images in the sprite
horizontally (left to right) and make sure the individual images in
the sprite have the same height. For the opposite case: when you want
to repeat horizontally, sprite vertically.
check this article for better understanding. http://www.phpied.com/background-repeat-and-css-sprites/
This question already has answers here:
When to use IMG vs. CSS background-image?
(31 answers)
Closed 8 years ago.
Should I use the <img> tag or should I use a div with css background-image?
If you want the image displayed normally on the page, then i would suggest using
img because it can moved positioned to your prefered area alot more accurately, but the background-image should only be used if you want the image to be the background of your page or of an object.
If you need create a kind of tumbs you must use <img> .And for background use background-image.
All browsers not interpreted the css rules in the same way.
Sorry for my english =/
Well, is your image a background image? If so, then use background-image. That is what it is made for, so you should use it.
If not, then use <img>
Background images usually have elements on top of them, such as text, for example.
Images are generally elements of their own, like blocks on the page, such as a <div> for example.
Having said that, there are some "advantages" with using <img> vs. background-image. For example, background-image will disable the users ability to drag and drop the image onto their desktop. This is not to say that they cannot save the image, they can, very easily, this is just one difference between the two.
This question already has answers here:
Convert an image to grayscale in HTML/CSS
(25 answers)
Closed 8 years ago.
What CSS would I have to use to make an image black and white until it was hovered over? I would prefer answers to be fully CSS as it will help me learn move about CSS transitions and animation.
You could try this: w3schools hover
You could define that CSS for pretty much any element. When the mouse is over it, the new style will apply.