diff --git a/Front-end/计算/index.html b/Front-end/计算/index.html new file mode 100644 index 0000000..ae3d018 --- /dev/null +++ b/Front-end/计算/index.html @@ -0,0 +1,177 @@ + + + + + 利息计算器 + + + + + + + + + + + + + +
+
+ + + +
+ 利息计算器 +
+ + + +
+
+ +
+
+ + + diff --git a/Front-end/计算/style.css b/Front-end/计算/style.css new file mode 100644 index 0000000..82ddb9e --- /dev/null +++ b/Front-end/计算/style.css @@ -0,0 +1,434 @@ + +html,body { + color: #333; + margin: 0; + height: 100%; + font-family: "Myriad Set Pro","Helvetica Neue",Helvetica,Arial,Verdana,sans-serif; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + font-weight: normal; +} + +* { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} + +a { + text-decoration: none; + color: #000; +} + +a, label, button, input, select { + -webkit-tap-highlight-color: rgba(0, 0, 0, 0); +} + +img { + border: 0; +} + +body { + background: #fff; + color: #666; +} + +html, body, div, dl, dt, dd, ol, ul, li, h1, h2, h3, h4, h5, h6, p, blockquote, pre, button, fieldset, form, input, legend, textarea, th, td { + margin: 0; + padding: 0; +} + +a { + text-decoration: none; + color: #08acee; +} + +button { + outline: 0; +} + +img { + border: 0; +} + +button,input,optgroup,select,textarea { + margin: 0; + font: inherit; + color: inherit; + outline: none; +} + +li { + list-style: none; +} + +a { + color: #666; +} + +.clearfix::after { + clear: both; + content: "."; + display: block; + height: 0; + visibility: hidden; +} + +.clearfix { +} + +.divHeight { + width: 100%; + height: 10px; + background: #f5f5f5; + position: relative; + overflow: hidden; +} + +.r-line { + position: relative; +} + +.r-line:after { + content: ''; + position: absolute; + z-index: 0; + top: 0; + right: 0; + height: 100%; + border-right: 1px solid #D9D9D9; + -webkit-transform: scaleX(0.5); + transform: scaleX(0.5); + -webkit-transform-origin: 100% 0; + transform-origin: 100% 0; +} + +.b-line { + position: relative; +} + +.b-line:after { + content: ''; + position: absolute; + z-index: 2; + bottom: 0; + left: 0; + width: 100%; + height: 1px; + border-bottom: 1px solid #e2e2e2; + -webkit-transform: scaleY(0.5); + transform: scaleY(0.5); + -webkit-transform-origin: 0 100%; + transform-origin: 0 100%; +} + +.aui-flex { + display: -webkit-box; + display: -webkit-flex; + display: flex; + -webkit-box-align: center; + -webkit-align-items: center; + align-items: center; + padding: 15px; + position: relative; +} + +.aui-flex-box { + -webkit-box-flex: 1; + -webkit-flex: 1; + flex: 1; + min-width: 0; + font-size: 14px; + color: #333; +} + +/* 必要布局样式css */ +.aui-flexView { + width: 100%; + height: 100%; + margin: 0 auto; + display: -webkit-box; + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + -webkit-box-orient: vertical; + -webkit-box-direction: normal; + -webkit-flex-direction: column; + -ms-flex-direction: column; + flex-direction: column; +} + +.aui-scrollView { + width: 100%; + height: 100%; + -webkit-box-flex: 1; + -webkit-flex: 1; + -ms-flex: 1; + flex: 1; + overflow-y: auto; + overflow-x: hidden; + -webkit-overflow-scrolling: touch; + position: relative; +} + +.aui-navBar { + height: 44px; + position: relative; + display: -webkit-box; + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + z-index: 1002; + background: #fff; +} + +.aui-navBar-item { + height: 44px; + min-width: 25%; + -webkit-box-flex: 0; + -webkit-flex: 0 0 25%; + -ms-flex: 0 0 25%; + flex: 0 0 25%; + padding: 0 0.9rem; + display: -webkit-box; + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + -webkit-box-align: center; + -webkit-align-items: center; + -ms-flex-align: center; + align-items: center; + font-size: 0.7rem; + white-space: nowrap; + overflow: hidden; + color: #808080; + position: relative; +} + +.aui-navBar-item:first-child { + -webkit-box-ordinal-group: 2; + -webkit-order: 1; + -ms-flex-order: 1; + order: 1; + margin-right: -25%; + font-size: 0.9rem; + font-weight: bold; +} + +.aui-navBar-item:last-child { + -webkit-box-ordinal-group: 4; + -webkit-order: 3; + -ms-flex-order: 3; + order: 3; + -webkit-box-pack: end; + -webkit-justify-content: flex-end; + -ms-flex-pack: end; + justify-content: flex-end; +} + +.aui-center { + -webkit-box-ordinal-group: 3; + -webkit-order: 2; + -ms-flex-order: 2; + order: 2; + display: -webkit-box; + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + -webkit-box-pack: center; + -webkit-justify-content: center; + -ms-flex-pack: center; + justify-content: center; + -webkit-box-align: center; + -webkit-align-items: center; + -ms-flex-align: center; + align-items: center; + height: 44px; + width: 50%; + margin-left: 25%; +} + +.aui-center-title { + text-align: center; + width: 100%; + white-space: nowrap; + overflow: hidden; + display: block; + text-overflow: ellipsis; + font-size: 0.95rem; + color: #333; + font-weight: bold; +} + +.icon { + width: 20px; + height: 20px; + display: block; + border: none; + float: left; + background-size: 20px; + background-repeat: no-repeat; +} + +.icon-return { + background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAElklEQVRoQ+WbTYgURxTH3+vpJrgg7EYIBHLIwYMXLzl4CWLGiCKEJXoRvIhg9jIzW12XTfQ0lyQeJtuvtgdCLoo3g7DkA5FIiCSLIRfxJksgMYSQwF52LoG4bPcLJb0iu93T09/lWNetN/3/dfVW1f+9KoQXpEkpX2VmAoB5APg5CIKe7/u/ZZWPWQOa6O+67uvM/AMiHtp5PjM/VEq9lVWP8cCu677JzGuI+MbzcMzMSqkWAHAWaKOBu93uIdu2fwSA13ZDTd0ISymPMPN3ADAbM4IblmUdXV5e/jXL6Oq+Ro7w4uJi27Ks2wCwL2Zk/0LEo0T0R1ZYI4GFEO8BwCoiOjGw64h4nIj+yQNrHLCU8gIzXwMAK+5/NoId5YU1ClgI0UVEPwHmvm3bpwaDwb9FYI0BFkJ8jIhXEmDuBkEw7/v+k6KwJgCjEOILRPwgAWZ1dnb2XL/f3y4DtlHgfr9vj0ajLwHgbALMDSK6mHVjkfZiGlmWer3eK61W6xsAOBknkJmHSqlemvg8f68deGlpaf/W1tYdAHg7QfAVIvo0D8wkMbUCdzqdA47j3AOAwzHLDluWddHzvBuTCM/bpzZg7XgA4CcAOBgjVk9K54hoNS/IpHG1AEspD4ZheG+349EimfmJZVnznufdnVR0kX6VA0spD0ewB2KE6o3EKSK6XwQiS2ylwJHj+R4A9seIGgVBcNz3/YdZBBftWxmwlPIkM38V53gAYGN7e/vYcDhcLwqQNb4SYNd19WZCbyrsGEHa1rXz2rusgLv7lw6sHU8YhtcRcc9vM/O64zjHBoPBRlHheeNLBRZCfISIsZsGnZIpw97lBd2JKw1YCOEjYjdBUGn2zgRgdF33OgBcSBBTqr1rFHhhYcGZmZm5OcbxlG7vGgOWUu4Lw/A2IrYTRFRi7xoBjhyP3lAciRNQpb1rBFgI8S0i6uxiXKvU3tUOrDMVm5ub/yGiLnM8a7r0UYe9MwoYES8RkU6zGttyrcNCiK8RUZct9zRmvqyUumoqcS7gtEkLAIiIpInQuYA1yATL0jUiulR21rHoS8wNrB+ctvFg5ltzc3Pny8wrNwocPTxta3knCIIzZVUOTAB+qiHFPKzZtn26jNqQMcAR9IeIGDtDM/MDRDxBRIWqf0YBR5PZuATAI8dx2lOTANh5++NSPMz8OAiCd4fD4eOio5UnvtAsPe6BaUm8IAjavu8/yiO6SExlwNHnrQ+mJKZpwzA8sbKy8qAIQNbYSoEj6LGJeEQ87XneWlbheftXDhxBjy21IOIZItIVxcpbLcCaIq2YxsznlVK3qiauDViDpJVL67CXtQJr6AkK4lJbrapGunZgDTLBkYerSqnLVUA3AqxBJjjU8jkRdcq2l40BR6M31mlVYS+bBn7K7bruJwCQ9AmXai+NAI6c1rijh6XZS2OAJ3BapdhLo4Cjz/ssM99MOD5c2F4aB6yhUw6Ia1v5jlLqzzzLlpHAaU6Lmf9utVrtqbkCsDNy+shTZC+n/5LHDvRLdY3nOeg9xxan7hrP7gkpuor3GQC8z8y/WJbV8Tzv96wT1/+UYTdbCjnE2AAAAABJRU5ErkJggg=='); +} + +.tab-nav { + height: 45px; + line-height: 45px; + display: block; + position: relative; + background: #fff; + z-index: 1; + width: 100%; + margin: 0 auto; +} + +.tab-nav-item { + height: 45px; + line-height: 45px; + position: relative; + text-align: center; + color: #585858; + font-size: 0.9rem; + display: block; + float: left; + width: 33.333%; +} + +.tab-nav-item.tab-active { + /* background-color: #51bd03; */ +} + +.tab-nav-item.tab-active a { + color: #222; + font-size: 0.85rem; +} + +.tab-nav-item a { + display: inherit; + font-size: 0.85rem; + color: #888; +} + +.tab-panel { + position: relative; + overflow: hidden; +} + +.tab-panel .tab-panel-item { + width: 100%; + position: absolute; + top: 0; + -webkit-transform: translateX(-100%); + transform: translateX(-100%); +} + +.tab-panel .tab-panel-item.tab-active ~ .tab-panel-item { + -webkit-transform: translateX(100%); + transform: translateX(100%); +} + +.tab-panel .tab-panel-item.tab-active { + position: relative; + -webkit-transition: -webkit-transform .15s; + transition: -webkit-transform .15s; + transition: transform .15s; + transition: transform .15s, -webkit-transform .15s; + -webkit-transform: translateX(0); + transform: translateX(0); +} + +.tab-nav-item.tab-active:before { + content: ''; + width: 70%; + height: 3px; + position: absolute; + left: 50%; + bottom: 0; + margin-left: -35%; + z-index: 4; + background-color: #fa623d; +} + +.aui-flex-box-right { + text-align: right; + position: relative; +} + +.aui-flex-box-right input { + background: none; + border: none; + width: 100%; + text-align: right; + padding-right: 1rem; + font-size: 0.9rem; +} + +.aui-flex-box-right span { + position: absolute; + right: 0; + top: -0.1rem; + font-size: 0.95rem; + color: #333; +} + +.aui-calc-title h2 { + font-weight: normal; + color: #333; + font-size: 0.95rem; +} + +.tab-panel-item .aui-flex { + padding: 1.5rem 1rem; +} + +.tab-panel-item .b-line:after { + width: 92%; + left: 15px; +} + +.aui-flex-box-right button { + background: #fa623d; + border: 1px solid #fa623d; + color: #fff; + font-size: 0.85rem; + border-radius: 3px; + padding: 0.1rem 0.2rem; +} + +.aui-flex-box-right button:nth-child(2) { + background: none; + color: #fa623d; + border: 1px solid #fa623d; +} + +.aui-flex-box-dow:after { + background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAACpklEQVRoQ+2VzYvTUBDAZ5JGsTdB8CCIiODBoxdZ/MLTKqweFtG/ozQNpZdcSmkT+md4EBRWYd2T+IXg4tXDXlYRFATBY9Gkb+RJC4+apGkySUP29VSadN785jczD+GIffCI8YIGrrtxbVgbrlkFdEvXTOh/ONqwNlyzCuiWrplQvbR0S+uWrlkFdEtHCXVd12g2m48A4AER7QshNrvd7q91yh8MBicNw9hFxCtE9HQymdx3XVcsyymVYd/3LwshPs6DEdEnIcS1dUHPYN8i4qV5ThLctu0PLMD9fv+0ZVmfAeDEuqGjYAFgQkQXHMf5zgIsg3ied4uIdgHguAptmubNdrv9c9lBHM9jYH8j4h3btl+mOSNVS88DxUAfmKZ5tWho3/dPTafTV2obA8BKsJJjJeAE04VCz2DfIeJFxeLKsJmAy4bmhM0MXBZ0FCwR/TEM43bamV2c65VbWg0QN9NhGN7o9Xo/0iyRuHfiYBHxXqfT2csaOxdwgunDMAw3skLLa7DRaLxWZ1aazQubq6UXTQshXiDiMeXKygQ9g32PiOeVWCywbMAy0Gg02iSinTzQRcOyAueFLgOWHTgJ2rKs661W61vUshmPx2eCIHhTVBurZ+ZeWlEAMe391bKsjUXoGayc2bNFzCzrtZR0NaSBjoENEXErz9WTlFchhucHJkHLd4IgWDQbAsC24zjPst6zy/5XKLAy088RsaG07Jd/CwTxnPJb4bCFLK2oCg+Hw7sA8ESFVt8jolJgSwOWB8VBlwlbKnAUdNmwpQPLAz3P2xJCPJbfDcN4aNv2zrJFw/m88KXFmSxHLA3MUcUqx9CGq2yHIzdtmKOKVY6hDVfZDkdu2jBHFascQxuush2O3LRhjipWOYY2XGU7HLlpwxxVrHKMvzbytEzMVwJXAAAAAElFTkSuQmCC'); + content: ''; + position: absolute; + z-index: 0; + bottom: 0.1rem; + right: 0; + width: 18px; + height: 18px; + background-size: 18px; +} + +.tab-button { + padding: 2rem 0; +} + +.tab-button button { + width: 92%; + margin: 0 auto; + display: block; + background: #fa623d; + color: #fff; + height: 3rem; + line-height: 3rem; + box-shadow: 0 3px 9px #d0d0d0; + border-radius: 5px; + border: none; +} diff --git a/Front-end/计算/tab.js b/Front-end/计算/tab.js new file mode 100644 index 0000000..981298d --- /dev/null +++ b/Front-end/计算/tab.js @@ -0,0 +1,145 @@ +/* +* author: lzy-aui +* tab.js +* http://azenui.com/ +* http://a-ui.cn/ +* http://588sucai.com/ +*/ +!function(window) { + "use strict"; + + var doc = window.document + , ydui = {}; + + $(window).on('load', function() {}); + + var util = ydui.util = { + + parseOptions: function(string) {}, + + pageScroll: function() {}(), + + localStorage: function() {}(), + + sessionStorage: function() {}(), + + serialize: function(value) {}, + + deserialize: function(value) {} + }; + + function storage(ls) {} + + $.fn.emulateTransitionEnd = function(duration) {} + ; + + if (typeof define === 'function') { + define(ydui); + } else { + window.YDUI = ydui; + } + +}(window); + +!function(window) { + "use strict"; + + function Tab(element, options) { + this.$element = $(element); + this.options = $.extend({}, Tab.DEFAULTS, options || {}); + this.init(); + this.bindEvent(); + this.transitioning = false; + } + + Tab.TRANSITION_DURATION = 150; + + Tab.DEFAULTS = { + nav: '.tab-nav-item', + panel: '.tab-panel-item', + activeClass: 'tab-active' + }; + + Tab.prototype.init = function() { + var _this = this + , $element = _this.$element; + + _this.$nav = $element.find(_this.options.nav); + _this.$panel = $element.find(_this.options.panel); + } + ; + + Tab.prototype.bindEvent = function() { + var _this = this; + _this.$nav.each(function(e) { + $(this).on('http://www.17sucai.com/preview/1268063/2018-12-13/calculator/js/click.ydui.tab', function() { + _this.open(e); + }); + }); + } + ; + + Tab.prototype.open = function(index) { + var _this = this; + + index = typeof index == 'number' ? index : _this.$nav.filter(index).index(); + + var $curNav = _this.$nav.eq(index); + + _this.active($curNav, _this.$nav); + + _this.active(_this.$panel.eq(index), _this.$panel, function() { + $curNav.trigger({ + type: 'http://www.17sucai.com/preview/1268063/2018-12-13/calculator/js/opened.ydui.tab', + index: index + }); + _this.transitioning = false; + }); + } + ; + + Tab.prototype.active = function($element, $container, callback) { + var _this = this + , activeClass = _this.options.activeClass; + + var $avtive = $container.filter('.' + activeClass); + + function next() { + typeof callback == 'function' && callback(); + } + + $element.one('webkitTransitionEnd', next).emulateTransitionEnd(Tab.TRANSITION_DURATION); + + $avtive.removeClass(activeClass); + $element.addClass(activeClass); + } + ; + + function Plugin(option) { + var args = Array.prototype.slice.call(arguments, 1); + + return this.each(function() { + var target = this + , $this = $(target) + , tab = $this.data('http://www.17sucai.com/preview/1268063/2018-12-13/calculator/js/ydui.tab'); + + if (!tab) { + $this.data('http://www.17sucai.com/preview/1268063/2018-12-13/calculator/js/ydui.tab', (tab = new Tab(target,option))); + } + + if (typeof option == 'string') { + tab[option] && tab[option].apply(tab, args); + } + }); + } + + $(window).on('http://www.17sucai.com/preview/1268063/2018-12-13/calculator/js/load.ydui.tab', function() { + $('[data-ydui-tab]').each(function() { + var $this = $(this); + $this.tab(window.YDUI.util.parseOptions($this.data('ydui-tab'))); + }); + }); + + $.fn.tab = Plugin; + +}(window);