Thanks to visit codestin.com
Credit goes to subscription.packtpub.com

Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Responsive Web Design with HTML5 and CSS
  • Table Of Contents Toc
  • Feedback & Rating feedback
Responsive Web Design with HTML5 and CSS

Responsive Web Design with HTML5 and CSS - Fifth Edition

By : Ben Frain
close
close
Responsive Web Design with HTML5 and CSS

Responsive Web Design with HTML5 and CSS

By: Ben Frain

Overview of this book

Responsive Web Design with HTML5 and CSS, Fifth Edition, is the very latest, up-to-date version of one of the bestselling books on HTML5 and CSS. It emphasizes pragmatic application, teaching the approaches needed to build websites and applications, with downloadable examples. Written in Ben's friendly and easy-to-follow style, this title can be read as a complete guide, or used as a reference for each topic. If you're a backend dev looking to understand the front of the web stack and its possibilities, or perhaps a frontend dev looking for a comprehensive resource on everything new in HTML and CSS to build the most efficient UIs, this is the book for you. Even if you are deferring your code writing to AI, this book gives you the requisite knowledge to understand the validity and efficiency of AI's output. Among the many topics, we cover approaches for better accessibility, utilizing variable fonts, explainers on the latest color manipulation techniques and functions, in-depth coverage of bleeding-edge features such as scroll-driven animations, view transitions, CSS anchor positioning, CSS layers, container queries, nesting, and much more. By the end, you'll not only have a thorough understanding of responsive web design and what's possible with the latest HTML5 and CSS, but also know how to best implement each technique.
Table of Contents (22 chapters)
close
close
Lock Free Chapter
1
The Fundamentals of Responsive Web Design
7
Core Skills for Effective Frontend Web Development
17
Latest Platform Features and Parting Advice
20
Other Books You May Enjoy
21
Index

mask-image

You can also mask elements with images, from either an image source with transparency, such as a PNG graphic, a linear gradient, which we looked at earlier in this chapter, or an SVG mask element. You can read about all the possibilities afforded to us in the specification here: https://www.w3.org/TR/css-masking-1/.

In the meantime, we will just look at a fairly straightforward example so you can appreciate the kind of effect that is possible and how the syntax works to achieve it.

Suppose we have an image. I have one that NASA took of Mars. I’d get one I took myself, but, you know, it’s a bit of a jaunt.

Now, suppose we also have a PNG image that is transparent except for the word MARS. We can use this PNG as a mask on top of our image element.

This is what we see in the browser:

Figure 9.31: A mask image applied

Here is our relevant HTML:

<img
  src="mars.jpg"
  alt="An image of Mars from space"
  class...
Visually different images
CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Responsive Web Design with HTML5 and CSS
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist download Download options font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon