public marks

PUBLIC MARKS from decembre with tags css & image

2019

CSS - TRICKS - Coloring SVGs in CSS Background Images by Noah Blon on CodePen

(via)
I love using SVG in CSS background images but it sucks that you can't alter the fill color easily within your CSS. Here are a few ways around that. # SVG in CSS backgrounds: Using SVG in CSS backgrounds allows you to use CSS's powerful background sizing and position properties. This makes sizing SVGs much simpler because the image easily scales to the size of your element. Plus you don't have SVG cluttering up your markup. There are also some nice performance benefits over inline SVG. An SVG in a background image can be cached. Using image sprites and embedding SVG as a data URI can also improve performance.

2018

IMAGE / CSS / ICON etc ....- AllTheFreeStock.com - Free Stock Images & Videos ~

by 1 other
Pour tous ceux qui aiment fouiller, des milliers de ressources photos, sons, vidéos classées par thématique. Vérifier les informations concernant les utilisations commerciales en fonction des copyrights.

2017

IMAGE TAG - CSS - How to Apply a CSS Class to an Inserted Image | Chron.com

(via)
How to Apply a CSS Class to an Inserted Image3. Add 'class="myimage"' within the img tag; it doesn't need to be in a specific location, such as before "title" or "alt," to function. For instance, if your code is (img src="myhouse.jpg" alt="Photo of my house")," it should become: (img src="myhouse.jpg" alt="Photo of my house" class="myimage")

CSS - Conserver le ratio 16/9 des images fullscreen et vidéos - Alsacreations

Le but est ici de faire en sorte que l'image de fond que l'on aura placée en CSS conserve son ratio de 16/9 et prenne toute la taille du navigateur, quelle que soit la taille de ce dernier (aka fullscreen). Pratique quand on fait du responsive. Voici le code utilisé : .ratio { background: url("monimage.jpg") no-repeat; background-size: cover; width: 100vw; height: 56.25vw; } Concrètement ce que l'on fait : on donne à l'image la largeur du navigateur grâce à l'unite vw (viewport-width) on lui donne la hauteur à laquelle on a appliqué un ratio 16:9 calculé en faisant 100 * 9 / 16 de la largeur du navigateur

CSS - SVG - fill | CSS-Tricks

Another Use Case: The fill property is one of many reasons SVG is a much more flexible option than typical image files. Let's take icons, as an example. We might have the same set of icons but in two different color schemes. Typical image files (such as JPG, PNG and GIF) would require us to make two versions of each icon — one for each color scheme. SVG, on the other hand, allows us to paint the icons in using the CSS fill property: .icon { fill: black; } .icon-secondary { fill: orange; }

CSS - How to Resize Background Images with CSS3 — SitePoint

(via)
Fortunately, CSS3 introduces the background-size property which allows backgrounds to be stretched or squashed. It’s ideal if you’re creating a template using Responsive Web Design techniques. There are several ways to define sizing dimensions — view the CSS3 background-size demonstration page.

2016

IMAGE RATIO - Online TOOL - Aspect Ratio Calculator (ARC)

(via)
Use the form below to calculate the missing value for a particular aspect ratio. This is useful, for example, when resizing photos or video. Formula Say you have a photo that is 1600 x 1200 pixels, but your blog only has space for a photo 400 pixels wide. To find the new height of your photo—while preserving the aspect ratio—you would need to do the following calculation: (original height / original width) x new width = new height___ (1200 / 1600) x 400 = 300__By example 742 : 349 ___

CSS - IMAGE RATIO - Maintain Aspect Ratio Mixin | CSS-Tricks

by 2 others (via)
maintaining the assigned aspect ratio as it resizes. .sixteen-nine { position: relative; } .sixteen-nine:before { display: block; content: ""; width: 100%; padding-top: 56.25%; } .sixteen-nine > .content { position: absolute; top: 0; left: 0; right: 0; bottom: 0; }

2015

CSS3 - SCROLL - NEW - Native CSS Scroll Snap Points | CSS-Tricks

The newly-introduced CSS “snap points” properties could make it a whole lot easier to create CSS-only scroll effects (once browser support catches up). This post from Sergey Gospodarets' blog includes demos of snappy scrolling for image galleries and full-page vertical scrolling.

DEV - TEST tool - Placehold.it - Quick and simple image placeholders

by 8 others
Welcome to placehold.it A quick and simple image placeholder service. How does it work? Just put your image size after our URL and you'll get a placeholder.

RESPONSIVE DESIGN - Which responsive images solution should you use? | CSS-Tricks

There are a bunch of techniques going around for dealing with responsive images lately. That is, solutions to help us serve the right image for the occasion (e.g. size of screen and bandwidth available). They all do things a bit differently. To keep track, Christopher Schmitt and I have created this spreadsheet of techniques.

2014

CSS - IMAGES RESPONSIVE - ResponsiveImages.org

(via)
A group of developers working towards a client-side solution for delivering alternate image data based on device capabilities to prevent wasted bandwidth and optimize display for both screen and print.

CSS - 2012 - Nouvelle méthode de remplacement de texte par une image

(via)
/* For image replacement */ .ir { border:0; font: 0/0 a; text-shadow: none; color: transparent; background-color: transparent; } Edit du 09/04/2012 — N’hésitez pas à jeter un oeil sur l’article : My thoughts about the latest Image Replacement techniques qui pointe les défauts de ces nouvelles méthodes de remplacement de texte par une image.

CSS - Responsive Images: Experimenting with Context-Aware Image Sizing | Filament Group, Inc., Boston, MA

(via)
What is this all about? The goal of this technique is to deliver optimized, contextual image sizes for responsive layouts that utilize dramatically different image sizes at different resolutions. Ideally, this approach will allow developers to start with mobile-optimized images in their HTML and specify a larger size to be used for users with larger screen resolutions — without requesting both image sizes, and without UA sniffing.

CSS - RESPONSIVE - Flexible Foundations | Trent Walton

Responsive or not, there’s no reason why we shouldn’t all be designing and building sites on flexible foundations.

2013

JAVASCRIPT - jQuery - Lazy Load Plugin for jQuery

by 10 others (via)
Lazy Load is delays loading of images in long web pages. Images outside of viewport are not loaded until user scrolls to them. This is opposite of image preloading. Using Lazy Load on long web pages will make the page load faster. In some cases it can also help to reduce server load.

CSS - MENU FLUIDE - voir demo Menu Fluide avec Images - 10 techniques avancées et secrets de CSS2 - Alsacreations

by 4 others
Modèle tabulaire Le design tabulaire à l'aide de CSS (entendons-nous bien, je ne parle évidemment pas des balises HTML table) est voué à un très bel avenir proche, enfin utilisable depuis IE8. Le modèle d'affichage tabulaire permet de réaliser de manière simplissime l'ensemble des cas de figure qui nous compliquent la vie actuellement : Hauteurs de frères identiques, Alignement vertical, Répartition de la hauteur restante, Répartition de la largeur restante, Un menu fluide, Réordonnement des blocs.

CSS - Best Practice ? - Images in CSS or HTML as data/base64 - Stack Overflow

by 1 other
t's a good practice usually only for very small CSS images that are going to be used together (like CSS sprites) when IE compatibility doesn't matter, and saving the request is more important than cacheability. It has a number of notable downsides: Doesn't work at all in IE6 and 7. Works for resources only up to 32k in size in IE8. It saves a request, but bloats the HTML page instead! And makes images uncacheable. They get loaded every time the containing page or style sheet get loaded. Base64 encoding bloats image sizes by 33%. If served in a gzipped resource, data: images are almost certainly going to be a terrible strain on the server's resources! Images are traditionally very CPU intensive to compress, with very little reduction in size.

hover effects on circles with CSS Transitions

by 2 others
Tutorial : How to create different interesting hover effects on circles with CSS transitions and 3D rotations.Border radius property, we can create circular shapes. Seeing is the circular thumbnail which just looks so much more interesting than the usual rectangular. And because the circle is such a special shape, we are going to create some special hover effects for it!

CSS - ONLINE TOOL - CREAT your SPRITE - Quickstart — glue 0.3 documentation

nstead of loading dozens of images, it is way better to load one big image and use the technique called CSS sprites. Glue is a simple command line tool to transform a set of images into a single file so you can easily use CSS sprites on your website. Super useful.

CSS - IIMAGE RATIO - Height equals width with pure CSS

by 1 other (via)
Solution pour des éléments flexibles qui gardent leurs proportions lors du redimensionnement . Jusqu'à présent, j'ai utilisé Javascript pour le redimensionnement des éléments. Mais l'utilisation de l'événement "resize" et "recalculate" pour la hauteur d'un élément est mauvais.... lors, qu'est- ce que c'est? SOLUTION : Définir un élément pseudo pour notre boîte et lui donner un margin-top de 100%. Cette valeur 100% se rapporte à la largeur de l' élément ... vous obtenez ( hauteur : 0; padding-bottom : 100%; devrait également fonctionner, mais vous devez alors ajuster la valeur padding-bottom chaque fois que vous modifiez la largeur ) . Donc, notre boîte est déjà plus élevé que large .../

CSS - Les colonnes factices - Pompage.net -

(via)
Comment faites-vous pour que la couleur d'arrière-plan de la colonne de droite s'étende jusqu'en bas de la page ?. Le secret, embarrassant de simplicité, est d'utiliser une image d'arrière-plan qui se répète verticalement pour créer l'illusion de colonnes en couleur

CSS - The Layered Look: Better Responsive Images Using Multiple Backgrounds | CSS-Tricks

The following is a guest post by Parker Bennett. Parker has written for CSS-Tricks before, in his article Crop Top dealing with the positioning of fluid images. This is a great follow up to that, presenting another option in the never-ending responsive images saga. It's also an interesting contrast to yesterday's post on responsive images - so you can see how very different the approaches to this problem can be.

2010

data: URI Generator - Convert Online Tool for Icon, image to import it in greasemonkey Script - dopiaza.org

data: URI Generator The data: URI scheme allows you to build URLs that embed small data objects. data: URIs are supported by most modern browsers except for Internet Explorer. The lack of IE support is holding back widespread adoption of data: URIs, but they are still very useful in a couple of specific areas such as embedding graphics and other data items in Greasemonkey scripts. You can read more about data: URIs and see some examples of their use, or use the generator below to create your own. data: URIs are defined in RFC 2397.