jQuery 滑动改变价格

2020-11-20 21:45

阅读:807

标签:style   http   color   os   width   io   

jQuery 滑动改变价格

mamicode.com,搜素材
演示

 

XML/HTML Code
  1. section id="content" >  
  2. div class="cube">  
  3. div class="a">div>  
  4. div class="b">div>  
  5. div class="c">div>  
  6. div class="d">div>  
  7. div id="slider-range-min">div>  
  8. div>  
  9. input type="text" id="amount" />  
  10. section>  

 

CSS Code
  1.   
  2. * {  
  3. margin0px;  
  4. padding0px;  
  5. }  
  6. .cube {  
  7. positionrelative;  
  8. width500px;  
  9. height60px;  
  10. margin: 5rem auto;  
  11. -webkit-transform-style: preserve-3d;  
  12. -moz-transform-style: preserve-3d;  
  13. -ms-transform-style: preserve-3d;  
  14. -o-transform-style: preserve-3d;  
  15. transform-style: preserve-3d;  
  16. -webkit-perspective: 400px;  
  17. -moz-perspective: 400px;  
  18. -ms-perspective: 400px;  
  19. -o-perspective: 400px;  
  20. perspective: 400px;  
  21. }  
  22. /* positions */  
  23. .a, .b, .c, .d {  
  24. positionabsolute;  
  25. width: 50%;  
  26. height: 100%;  
  27. left0px;  
  28. z-index: 222;  
  29. }  
  30. .a:before, .b:before, .c:before, .d:before, .a:after, .b:after {  
  31. content‘‘;  
  32. positionabsolute;  
  33. top0px;  
  34. left0px;  
  35. width500px;  
  36. height60px;  
  37. }  
  38. .a:before, .b:before, .c:before, .d:before {  
  39. z-index: 111;  
  40. }  
  41. .a:after, .b:after {  
  42. z-index: 333;  
  43. }  
  44. .b {  
  45. top0px;  
  46. -webkit-transform: rotateX(75deg) translateY(-60px);  
  47. -moz-transform: rotateX(75deg) translateY(-60px);  
  48. -o-transform: rotateX(75deg) translateY(-60px);  
  49. -ms-transform: rotateX(75deg) translateY(-60px);  
  50. transform: rotateX(75deg) translateY(-60px);  
  51. -webkit-transform-origin: 0% 0%;  
  52. -moz-transform-origin: 0% 0%;  
  53. -o-transform-origin: 0% 0%;  
  54. -ms-transform-origin: 0% 0%;  
  55. transform-origin: 0% 0%;  
  56. }  
  57. .c {  
  58. top0px;  
  59. -webkit-transform: rotateX(75deg);  
  60. -moz-transform: rotateX(75deg);  
  61. -o-transform: rotateX(75deg);  
  62. -ms-transform: rotateX(75deg);  
  63. transform: rotateX(75deg);  
  64. -webkit-transform-origin: 100% 100%;  
  65. -moz-transform-origin: 100% 100%;  
  66. -o-transform-origin: 100% 100%;  
  67. -ms-transform-origin: 100% 100%;  
  68. transform-origin: 100% 100%;  
  69. }  
  70. .d {  
  71. -webkit-transform: translateZ(-60px) translateY(-15px);  
  72. -moz-transform: translateZ(-60px) translateY(-15px);  
  73. -o-transform: translateZ(-60px) translateY(-15px);  
  74. -ms-transform: translateZ(-60px) translateY(-15px);  
  75. transform: translateZ(-60px) translateY(-15px);  
  76. }  
  77. /* colors */  
  78. .a, .b {  
  79. background-image: -webkit-gradient(linear, left topleft bottombottom, from(rgba(116,198,43,0.8)), to(rgba(116,198,43,0.8)));  
  80. background-image: -webkit-linear-gradient(top, rgba(116,198,43,0.8), rgba(116,198,43,0.8));  
  81. background-image: -moz-linear-gradient(top, rgba(116,198,43,0.8), rgba(116,198,43,0.8));  
  82. background-image: -o-linear-gradient(top, rgba(116,198,43,0.8), rgba(116,198,43,0.8));  
  83. background-image: linear-gradient(to bottombottom, rgba(116,198,43,0.8), rgba(116,198,43,0.8));  
  84. background-repeatno-repeat;  
  85. background-size: 100% 100%;  
  86. background-position: 0% 0%;  
  87. }  
  88. .c, .d {  
  89. background-image: -webkit-gradient(linear, left topleft bottombottom, from(rgba(116,198,43,0.5)), to(rgba(116,198,43,0.5)));  
  90. background-image: -webkit-linear-gradient(top, rgba(116,198,43,0.5), rgba(116,198,43,0.5));  
  91. background-image: -moz-linear-gradient(top, rgba(116,198,43,0.5), rgba(116,198,43,0.5));  
  92. background-image: -o-linear-gradient(top, rgba(116,198,43,0.5), rgba(116,198,43,0.5));  
  93. background-image: linear-gradient(to bottombottom, rgba(116,198,43,0.5), rgba(116,198,43,0.5));  
  94. background-repeatno-repeat;  
  95. background-size: 100% 100%;  
  96. background-position: 0% 0%;  
  97. }  
  98. .c:before {  
  99. -webkit-box-shadow: 0px 30px 20px -20px rgba(0,0,0,0.4), 0px 40px 15px -15px rgba(0,0,0,0.25);  
  100. -moz-box-shadow: 0px 30px 20px -20px rgba(0,0,0,0.4), 0px 40px 15px -15px rgba(0,0,0,0.25);  
  101. box-shadow: 0px 30px 20px -20px rgba(0,0,0,0.4), 0px 40px 15px -15px rgba(0,0,0,0.25);  
  102. }  
  103. .a:before, .b:before, .c:before, .d:before {  
  104. background-color: rgba(0,0,0,0.05);  
  105. }  
  106. .a:after {  
  107. background-image: -webkit-gradient(linear, left topleft bottombottom, from(rgba(0,0,0,0.07)), to(rgba(0,0,0,0)));  
  108. background-image: -webkit-linear-gradient(top, rgba(0,0,0,0.07), rgba(0,0,0,0));  
  109. background-image: -moz-linear-gradient(top, rgba(0,0,0,0.07), rgba(0,0,0,0));  
  110. background-image: -o-linear-gradient(top, rgba(0,0,0,0.07), rgba(0,0,0,0));  
  111. background-image: linear-gradient(to bottombottom, rgba(0,0,0,0.07), rgba(0,0,0,0));  
  112. }  
  113. .b:after {  
  114. background-image: -webkit-gradient(linear, left topleft bottombottom, from(rgba(255,255,255,0.1)), to(rgba(255,255,255,0.25)));  
  115. background-image: -webkit-linear-gradient(top, rgba(255,255,255,0.1), rgba(255,255,255,0.25));  
  116. background-image: -moz-linear-gradient(top, rgba(255,255,255,0.1), rgba(255,255,255,0.25));  
  117. background-image: -o-linear-gradient(top, rgba(255,255,255,0.1), rgba(255,255,255,0.25));  
  118. background-image: linear-gradient(to bottombottom, rgba(255,255,255,0.1), rgba(255,255,255,0.25));  
  119. }  
  120. /* jQuery stuff */  
  121. #slider-range-min {  
  122. positionabsolute;  
  123. width: 94%;  
  124. left: 3%;  
  125. top27px;  
  126. margin0px;  
  127. z-index: 999;  
  128. }  
  129. .ui-slider {  
  130. height5px;  
  131. bordernone;  
  132. background: rgba(0,0,0,0.1);  
  133. -webkit-box-shadow: 0px 2px 2px rgba(255,255,255,0.25), inset 0px 1px 3px rgba(0,0,0,0.3);  
  134. -moz-box-shadow: 0px 2px 2px rgba(255,255,255,0.25), inset 0px 1px 3px rgba(0,0,0,0.3);  
  135. box-shadow: 0px 2px 2px rgba(255,255,255,0.25), inset 0px 1px 3px rgba(0,0,0,0.3);  
  136. }  
  137. .ui-slider:before, .ui-slider:after {  
  138. content‘IIIIIIIIIII‘;  
  139. positionabsolute;  
  140. left2px;  
  141. width: 100%;  
  142. font-family‘Source Sans Pro‘sans-serif;  
  143. font-size: 1.2rem;  
  144. font-weight: 300;  
  145. color: rgba(0,0,0,0.3);  
  146. letter-spacing41px;  
  147. text-shadow1px 1px 0px rgba(255,255,255,0.2);  
  148. }  
  149. .ui-slider:before {  
  150. top: -1.4rem;  
  151. }  
  152. .ui-slider:after {  
  153. bottombottom: -1.4rem;  
  154. }  
  155. .ui-slider-range {  
  156. backgroundtransparent;  
  157. }  
  158. .ui-slider .ui-slider-handle {  
  159. top: -8px;  
  160. width26px;  
  161. height20px;  
  162. margin-left: -15px;  
  163. padding-left4px;  
  164. bordernone;  
  165. background: rgba(255,255,255,0.7);  
  166. border-radius: 2px;  
  167. text-aligncenter;  
  168. font-family‘Anonymous Pro‘sans-serif;  
  169. font-size: 1.2rem;  
  170. line-height20px;  
  171. color: rgba(0,0,0,0.5);  
  172. text-decorationnone;  
  173. letter-spacing3px;  
  174. cursorpointer;  
  175. text-shadow1px 1px 2px rgba(255,255,255,1);  
  176. -webkit-box-shadow: 1px 1px 8px rgba(0,0,0,0.3);  
  177. -moz-box-shadow: 1px 1px 8px rgba(0,0,0,0.3);  
  178. box-shadow: 1px 1px 8px rgba(0,0,0,0.3);  
  179. }  
  180. .ui-slider .ui-slider-handle:focus {  
  181. outlinenone;  
  182. }  
  183. /* typo */  
  184. h1 {  
  185. font-size: 2.7rem;  
  186. font-weight: 200;  
  187. color: rgba(0,0,0,0.6);  
  188. text-shadow1px 1px 0px rgba(255,255,255,0.3);  
  189. }  
  190. p {  
  191. font-size: 1.2rem;  
  192. font-weight: 300;  
  193. line-height: 1.8rem;  
  194. color: rgba(0,0,0,0.8);  
  195. }  
  196. .credits a {  
  197. positionrelative;  
  198. displayinline-block;  
  199. color#529e0e;  
  200. text-decorationnone;  
  201. }  
  202. .credits a:after {  
  203. content‘‘;  
  204. positionabsolute;  
  205. left: -1.5%;  
  206. bottombottom: -1px;  
  207. width: 0%;  
  208. height1px;  
  209. background#529e0e;  
  210. -webkit-transition: width 0.1s;  
  211. -moz-transition: width 0.1s;  
  212. -o-transition: width 0.1s;  
  213. transition: width 0.1s;  
  214. }  
  215. .credits a:hover::after {  
  216. width: 103%;  
  217. }  
  218. #amount {  
  219. positionrelative;  
  220. displayinline-block;  
  221. padding-bottom: 5rem;  
  222. text-aligncenter;  
  223. font-family‘Exo‘sans-serif;  
  224. font-weight: 800;  
  225. font-size: 4rem;  
  226. color#529e0e;  
  227. backgroundtransparent;  
  228. bordernone;  
  229. }  
  230. #amount:focus {  
  231. outlinenone;  
  232. }  
  233. /* base */  
  234. #content {  
  235. -webkit-box-sizing: border-box;  
  236. -moz-box-sizing: border-box;  
  237. box-sizing: border-box;  
  238. width: 100%;  
  239. height: 100%;  
  240. padding-top: 5rem;  
  241. text-aligncenter;  
  242. }  
  243. html, body {  
  244. height: 100%;  
  245. background-image: -webkit-gradient(linear, left topleft bottombottom, from(rgba(0,0,0,0.08)), to(rgba(0,0,0,0.05)));  
  246. background-image: -webkit-linear-gradient(top, rgba(0,0,0,0.08), rgba(0,0,0,0.05));  
  247. background-image: -moz-linear-gradient(top, rgba(0,0,0,0.08), rgba(0,0,0,0.05));  
  248. background-image: -o-linear-gradient(top, rgba(0,0,0,0.08), rgba(0,0,0,0.05));  
  249. background-image: linear-gradient(to bottombottom, rgba(0,0,0,0.08), rgba(0,0,0,0.05));  
  250. background-repeatno-repeat;  
  251. background-size: 100% 100%;  
  252. background-position: 0% 0%;  
  253. font-family‘Source Sans Pro‘sans-serif;  
  254. }  
  255.   

 


原文地址:http://www.freejs.net/article_jquerywenzi_145.html

jQuery 滑动改变价格,搜素材,soscw.com

jQuery 滑动改变价格

标签:style   http   color   os   width   io   

原文地址:http://blog.csdn.net/freejs/article/details/24656615


评论


亲,登录后才可以留言!