js+css编写的一个计算器效果代码
代码语言:html
所属分类:布局界面
代码描述:js+css编写的一个计算器效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<style>
@import url("https://fonts.googleapis.com/css2?family=Lato&family=Plaster&display=swap");
@font-face {
font-family: "Digital dream Regular";
font-style: normal;
font-weight: normal;
src: url("//repo.bfw.wiki/bfwrepo/font/digital-dream.regular.woff") format("woff");
}
*::after,
*::before,
* {
margin: 0;
padding: 0;
box-sizing: inherit;
}
html {
font-size: 62.5%;
}
body {
box-sizing: border-box;
background-color: #E0E0E0;
font-family: "Lato", sans-serif;
}
.calculator {
width: 40rem;
height: 60rem;
margin: 5rem auto;
}
.calculator__top {
width: 40rem;
height: 20rem;
padding: 1.2rem;
background-color: rgba(0, 0, 0, 0.9);
border-top-right-radius: 2.5rem;
border-top-left-radius: 2.5rem;
display: flex;
flex-direction: column;
justify-content: space-evenly;
position: relative;
}
.calculator__top h1 {
color: rgba(255, 255, 255, 0.9);
font-family: "Plaster", cursive;
}
.calculator__top--display {
width: 100%;
height: 12rem;
border: 1.5rem solid #494D56;
background-color: rgba(255, 255, 255, 0.7);
border-radius: 1rem;
font-size: 1.6rem;
text-align: right;
color: black;
padding: 0.5rem;
font-family: "Digital dream Regular";
}
.calculator__top--display.on {
background-color: #48A1BE;
}
.calculator__top:after {
content: linear-gradient(105deg, rgba(224, 224, 224, 0.3) 31%, transparent 33%);
position: absolute;
width: 100%;
height: 100%;
top: 0;
left: 0;
}
.calculator__middle {
w.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0