本文实例为大家分享了Vue实现计算器计算效果的具体代码,供大家参考,具体内容如下
compare *{ padding: 0; margin: 0; box-sizing: border-box; } body{ background-color: #000000; } .panle{ border: 1px solid #5f5f5f; width: 100vw; height: 29vh; font-size: 3.8125rem; color: #FFFFFF; text-align: right; position: relative; } .curr{ display: block; position: absolute; width: inherit; bottom: 0; font-size: 3.5rem; } .operation{ display: block; position: absolute; width: inherit; bottom: 80px; font-size: 2.875rem; } .prev{ font-size: 2.875rem; display: block; position: absolute; width: inherit; bottom: 8rem; } .keyboad{ display: flex; flex-flow: row wrap; margin: 0 calc((8vw - 16px) / 2); } .key{ display: inline-block; border: 1px solid #333; width: 23vw; height: 23vw; border-radius: 50%; text-align: center; font-size: 30px; line-height: 23vw; margin: 2px; background-color: #616161; color: #ffffff; cursor: pointer; outline: none; border: none; box-shadow: 0 9px #999; } .key:active { box-shadow: 0 5px #666; transform: translateY(4px); } .key:last-child{ border-radius: 30%; flex-grow: 1; margin: 0; } .highlight{ background-color: #e77919; } {{prevNum}} {{operation}} {{currNum}} AC <- # / 7 8 9 * 4 5 6 - 1 2 3 + 0 . =
以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持考高分网。



