Summary Files Commits Branches @commit @diff @stats
path: root / src
diff options
context:
space:
mode:
Commitfbfad8301b6ab01cc144aeb4f7fea5f2ee0ece64 (patch)
Author
 Yan Zhu <picturepan2@hotmail.com>
2017-11-26 13:22:25 +0800
Committer
 Yan Zhu <picturepan2@hotmail.com>
2017-11-26 13:22:25 +0800
Files118fa0717b05a3e074d91cba88e54b40c568f1ec /src
Spectre-Dark-Gruvbox-fbfad8301b6ab01cc144aeb4f7fea5f2ee0ece64.tar
Spectre-Dark-Gruvbox-fbfad8301b6ab01cc144aeb4f7fea5f2ee0ece64.tar.gz
Spectre-Dark-Gruvbox-fbfad8301b6ab01cc144aeb4f7fea5f2ee0ece64.zip
Parent6ad27a469d445045e4a3283a6e8cd33a48460507 (diff)
Add touch support to Parallax image hover effect
1 files changed, 5 insertions, 0 deletions
-rw-r--r--src/_parallax.scss5
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);