Code Monkey home page Code Monkey logo

image-set-function's Introduction

Creating responsive images with image-set css function ✍️

This is the code example for my article on Creating responsive images with image-set for Uploadcare. Here is the live demo.

Visit my blog, Timonwa's Notes, for awesome technical content like articles, code snippets, tech goodies, community projects, and more.

Summary

image-set is a CSS function that allows you to make an image responsive, showing variations of the same picture for different screen resolutions when needed. This function is almost the same as the HTML srcset attribute for img tags. We should always make our web images responsive so as to render high-quality images on different devices (known as resolution switching), load the right images on different screen sizes. (known as art direction), and for faster loading of web pages.

Breakdown

  • What are responsive images?
  • Why responsive images?
  • Resolution switching
  • Art direction
  • Speed up loading of web pages
  • Use image-set function
  • How to create responsive images with image-set
    • Syntax
  • How does the image-set function differ from the srcset attribute?
  • Conclusion

Please give this repo a ⭐ if it was helpful to you.

image-set-function's People

Contributors

timonwa avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.