Search

Nalezeno "1:1 ratio": 146

Responsive Iframes


Say you wanted to put the CSS-Tricks website in an <iframe>. You'd do that like this: <iframe src="https://css-tricks.com"></iframe> Without any other styling, you'd get a rectangle that is 300x150 pixels in size. That's not even in the User Agent stylesheet, it's just some...

The Fight Against Layout Jank


A web page isn't locked in stone just because it has rendered visually. Media assets, like images, can come in and cause the layout to shift based on their size, which typically isn't known in fluid layouts until they do render. Or fonts can load and reflow layout. Or XHRs can bring in more content...

How to Use Bitcoin to Invest in Gold


Gold and bitcoin enjoy a curious relationship. On the one hand, there is a significant crossover between investors in both, particularly from libertarians who don’t trust the U.S. dollar. But on the other hand, initiatives such as #DropGold have sought to position bitcoin as a more portable...

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...

Designing An Aspect Ratio Unit For CSS


Rachel Andrew says that the CSS Working Group designed an aspect ration unit at a recent meeting. The idea is to find an elegant solution to those times when we want the height of an element to be calculated in response to the width of the element, or vice versa. Say, for example, we have a grid...

How to create a logo that responds to its own aspect ratio


One of the cool things about <svg> is that it's literally its own document, so @media queries in CSS inside the SVG are based on its viewport rather than the HTML document that likely contains it. This unique feature has let people play around for years. Tim Kadlec experimented with...

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