From d8efc14e824b58c7fbb8424fee035c23f2976004 Mon Sep 17 00:00:00 2001 From: Shobhit Sachan <31156049+sachans@users.noreply.github.com> Date: Wed, 7 Mar 2018 03:11:55 +0530 Subject: [PATCH] Update and rename hover-shadow-out-animation.md to hover-shadow-box-animation.md --- snippets/hover-shadow-box-animation.md | 75 ++++++++++++++++++++++++++ snippets/hover-shadow-out-animation.md | 10 ---- 2 files changed, 75 insertions(+), 10 deletions(-) create mode 100644 snippets/hover-shadow-box-animation.md delete mode 100644 snippets/hover-shadow-out-animation.md diff --git a/snippets/hover-shadow-box-animation.md b/snippets/hover-shadow-box-animation.md new file mode 100644 index 000000000..344012e94 --- /dev/null +++ b/snippets/hover-shadow-box-animation.md @@ -0,0 +1,75 @@ +### Hover Shadow Box Animation + + +Creates a shadow box around the text whern it is hovered. + +#### HTML + +```html +< h4 class = "hover-shadow-box-animation"> Box it! +``` + +#### CSS + +```css +.hover-shadow-box-animation{ + display: inline-block; + vertical-align: middle; + -webkit-transform:perspective(1px) translateZ(0); + transform: perspective(1px) translateZ(0); + box-shadow: 0 0 1px transparent; + -webkit-transition-duration : 0.3s; + transition-duration: 0.3s; + -webkit-transition-property: box-shadow, transform; + transition-property: box-shadow, transform; +} +.hover-shadow-box-animation:hover, .hover-shadow-box-animation:focus, .hover-shadow-box-animation:active{ + box-shadow: 1px 10px 10px -10px rgba(0,0,24,0.5); + -webkit-transform: scale(1.2); + transform: scale(1.2); +} +``` +#### Demo + +