diff options
author | Yan Zhu <picturepan2@hotmail.com> | 2017-11-26 08:22:25 +0300 |
---|---|---|
committer | Yan Zhu <picturepan2@hotmail.com> | 2017-11-26 08:22:25 +0300 |
commit | fbfad8301b6ab01cc144aeb4f7fea5f2ee0ece64 (patch) | |
tree | 118fa0717b05a3e074d91cba88e54b40c568f1ec /src | |
parent | 6ad27a469d445045e4a3283a6e8cd33a48460507 (diff) |
Add touch support to Parallax image hover effect
Diffstat (limited to 'src')
-rw-r--r-- | src/_parallax.scss | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/_parallax.scss b/src/_parallax.scss index cb5e932..acc05be 100644 --- a/src/_parallax.scss +++ b/src/_parallax.scss @@ -9,6 +9,7 @@ $parallax-fade-color: rgba(255, 255, 255, .35) !default; // Mixin: Parallax direction @mixin parallax-dir() { height: 50%; + outline: none; position: absolute; width: 50%; z-index: $zindex-1; @@ -61,6 +62,7 @@ $parallax-fade-color: rgba(255, 255, 255, .35) !default; left: 0; top: 0; + &:focus ~ .parallax-content, &:hover ~ .parallax-content { transform: perspective($parallax-perspective) rotateX($parallax-deg) rotateY(-$parallax-deg); @@ -79,6 +81,7 @@ $parallax-fade-color: rgba(255, 255, 255, .35) !default; right: 0; top: 0; + &:focus ~ .parallax-content, &:hover ~ .parallax-content { transform: perspective($parallax-perspective) rotateX($parallax-deg) rotateY($parallax-deg); @@ -97,6 +100,7 @@ $parallax-fade-color: rgba(255, 255, 255, .35) !default; bottom: 0; left: 0; + &:focus ~ .parallax-content, &:hover ~ .parallax-content { transform: perspective($parallax-perspective) rotateX(-$parallax-deg) rotateY(-$parallax-deg); @@ -115,6 +119,7 @@ $parallax-fade-color: rgba(255, 255, 255, .35) !default; bottom: 0; right: 0; + &:focus ~ .parallax-content, &:hover ~ .parallax-content { transform: perspective($parallax-perspective) rotateX(-$parallax-deg) rotateY($parallax-deg); |