D3
OG
Old school D3 from simpler times
All examples
By author
By category
About
newsroomdev
Full window
Github gist
Share Button Animation 1
Built with
blockbuilder.org
<!DOCTYPE html> <head> <meta charset="utf-8"> <script src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.5/d3.min.js"></script> <style> body { font-size:10px; } .wrapper { width: 100%; max-width: 960px; margin: 0 auto; } .share-button { width: 3.5em; height: 2.3em; background: #7f7f7f; mask: url('https://bl.ocks.org/geraldarthur/raw/116af86f1731976652d8/0309cb99d312e829c3bdb2e616e138c3e70ac307/share-arrow-icon.svg') no-repeat 100% 0%; -webkit-mask: url('https://bl.ocks.org/geraldarthur/raw/116af86f1731976652d8/0309cb99d312e829c3bdb2e616e138c3e70ac307/share-arrow-icon.svg') no-repeat 100% 0%; mask-size: 3.4em; -webkit-mask-size: 3.4em; float: right; } </style> </head> <body> <script> var margin = {top: 20, right: 10, bottom: 20, left: 10}; var width = 960 - margin.left - margin.right; var height = 500 - margin.top - margin.bottom; var wrapper = d3.select('body') .append('div') .attr('class', 'wrapper') .append('div') .attr('class', 'share-button') </script> </body>
https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.5/d3.min.js