📜  html代码示例中的计算器

📅  最后修改于: 2022-03-11 14:53:13.645000             🧑  作者: Mango

代码示例1


  
    
    
    Calculator 
  

  

      * {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background: #fffbd5; /* fallback for old browsers */
  background: -webkit-linear-gradient(
    to right,
    #b20a2c,
    #fffbd5
  ); /* Chrome 10-25, Safari 5.1-6 */
  background: linear-gradient(
    to right,
    #b20a2c,
    #fffbd5
  ); /* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */
}
.container-first {
  position: relative;
  background: #0b8000;
  border-radius: 6px;
  overflow: hidden;
  z-index: 10;
}
.container-first .calculator {
  position: relative;
  display: grid;
}
.container-first .calculator .value {
  grid-column: span 4;
  height: 140px;
  width: 300px;

  border: none;
  padding-left: 1em;

  font-size: 2.5em;

  color: gold;
}
.container-first .calculator span {
  display: grid;
  height: 4.5em;
  font-weight: 900;
  color: rgb(255, 255, 255);
  text-align: center;
  align-items: center;

  font-size: 20px;
  user-select: none;
  border-bottom: 4px solid rgba(255, 255, 255, 0.07);
  border-right: 4px solid rgba(255, 255, 255, 0.07);
}
input[type="text"] {
  color: rgb(255, 136, 0);
  background-color: rgb(156, 40, 40);
}
  
    
4 5 6 = 7 8 9 - 1 2 3 / 0 C * 00 +