Search

Nalezeno "images": 354

What if we got aspect-ratio sized images by doing almost nothing?


Say you have an image you're using in an <img> that is 800x600 pixels. Will it actually display as 800px wide on your site? It's very likely that it will not. We tend to put images into flexible container elements, and the image inside is set to width: 100%;. So perhaps that image ends...

Do you need an ICON ONLY button without screwing up the accessibility?


The first consideration is: do you really? If you can, having text next to your icons is proven over and over again to be the most accessible and clearest UX (see Apple's latest blunder). But if you need to (and I get it, sometimes you need to), Sara Soueidan and Scott O'Hara have a pair...

An Exercise Program for the Fat Web


When I wrote about App-pocalypse Now in 2014, I implied the future still belonged to the web. And it does. But it's also true that the web has changed a lot in the last 10 years, much less the last 20 or 30. Websites have gotten a lot … fatter. While

Footnotes That Work in RSS Readers


Feedbin is the RSS reader I'm using at the moment. I was reading one of Harry's blog posts on it the other day, and I noticed a nice little interactive touch right inside Feedbin. There was a button-looking element with the number one which, as it turned out, was a footnote. I hovered over it,...

A Deep Dive into Native Lazy-Loading for Images and Frames


Today's websites are packed with heavy media assets like images and videos. Images make up around 50% of an average website's traffic. Many of them, however, are never shown to a user because they're placed way below the fold. What’s this thing about images being lazy, you ask? Lazy-loading...

A CSS Golfing Exercise


Code golfing is a type of programming where the goal is to accomplish a task using as few bytes as possible. CSSBattle is a code golfing battleground where players complete to recreate target images using CSS and HTML. The rules are fairly simple: No external resources (sorry, no <img...

Native Lazy Loading


IntersectionObserver has made lazy loading a lot easier and more efficient than it used to be, but to do it really right you still gotta remove the src and such, which is cumbersome. It's definitely not as easy as: <img src="celebration.jpg" loading="lazy" alt="..." /> Addy Osmani says...

Who has the fastest website in F1?


Jake Archibald looks at the websites of Formula One race teams and rates their performance, carefully examining their images and digging into the waterfall of assets for each site: Trying to use a site while on poor connectivity is massively frustrating, so anything sites can do to make it less...

Perfect Image Optimization for Mobile with Optimole


(This is a sponsored post.) In 2015 there were 24,000 different Android devices, and each of them was capable of downloading images. And this was just the beginning. The mobile era is starting to gather pace with mobile visitors starting to eclipse desktop. One thing is certain, building...

Planning for Responsive Images


The first time I made an image responsive, it was as simple as coding these four lines: img { max-width: 100%; height auto; /* default */ } Though that worked for me as a developer, it wasn’t the best for the audience. What happens if the the image in the src attribute is heavy? On high-end...

Did you know that CSS Custom Properties can handle images too?


So you might be aware of CSS Custom Properties that let you set a variable, such as a theme color, and then apply it to multiple classes like this: :root { --theme: #777; } .alert { background: var(—-theme); } .button { background: var(—-theme); } Well, I had seen this pattern so often...

How to Create a Fake 3D Image Effect with WebGL


Learn how to create an interactive "fake" 3D effect for images with depth maps and plain WebGL. How to Create a Fake 3D Image Effect with WebGL was written by Yuriy Artyukh and published on Codrops

Social Cards as a Service


I love the idea of programmatically generated images. That power is close at hand these days for us front-end developers, thanks to the concept of headless browsers. Take Puppeteer, the library for controlling headless Chrome. Generating images from URLs is their default use case: const puppeteer...

Nahoru
Tento web používá k poskytování služeb a analýze návštěvnosti soubory cookie. Používáním tohoto webu s tímto souhlasíte. Další informace