API de notificação WebKit

Botão <button id=”button”>Show Notification</button> API de notificação WebKit document.querySelector(‘#button’).addEventListener(‘click’, function() { if (window.webkitNotifications.checkPermission() == 0) { notification = window.webkitNotifications.createNotification(‘icon.png’, ‘Notification Title Goes Here’, ‘Notification Content Goes Here’); notification.show(); } else …

Continuar lendo

background-size e SVG

Se o que background-sizevocê deseja usar em um SVG background-imagenão respeita sua proporção, é necessário definir o parâmetro preserveAspectRatiocomo noneno elemento raiz SVG. <svg >=”http://www.w3.org/2000/svg” width=”96″ height=”96″ viewBox=”0 0 96 …

Continuar lendo