商品列表页面 增加鼠标进入动画
code review by bikai
Showing
2 changed files
with
12 additions
and
2 deletions
@@ -135,7 +135,6 @@ exports.init = function(num) { | @@ -135,7 +135,6 @@ exports.init = function(num) { | ||
135 | 135 | ||
136 | // 鼠标悬浮获取到商品信息后显示第一张图片 | 136 | // 鼠标悬浮获取到商品信息后显示第一张图片 |
137 | if (data[0] && data[0].src) { | 137 | if (data[0] && data[0].src) { |
138 | - $(event.target).find('.good-thumb img').attr('src', data[0].src); | ||
139 | $goodInfoMain.find('.good-thumb img').attr('src', data[0].src); | 138 | $goodInfoMain.find('.good-thumb img').attr('src', data[0].src); |
140 | } | 139 | } |
141 | 140 |
@@ -125,9 +125,20 @@ | @@ -125,9 +125,20 @@ | ||
125 | } | 125 | } |
126 | } | 126 | } |
127 | 127 | ||
128 | + @keyframes slideRight { | ||
129 | + from { | ||
130 | + width: 0; | ||
131 | + } | ||
132 | + to { | ||
133 | + width: 50px; | ||
134 | + } | ||
135 | + } | ||
136 | + | ||
128 | .good-select-color { | 137 | .good-select-color { |
129 | float: left; | 138 | float: left; |
130 | margin-top: 22px; | 139 | margin-top: 22px; |
140 | + overflow: hidden; | ||
141 | + animation: slideRight 200ms 1; | ||
131 | 142 | ||
132 | ul { | 143 | ul { |
133 | display: block; | 144 | display: block; |
@@ -175,4 +186,4 @@ | @@ -175,4 +186,4 @@ | ||
175 | } | 186 | } |
176 | 187 | ||
177 | 188 | ||
178 | -} | ||
189 | +} |
-
Please register or login to post a comment