JSFiddle - React, Tailwind, and code Playground
HTML
<div class='card'>
<button onclick="myFunction()">我要訂購</button>
<button onclick="myFactory()">認識工廠</button>
</div>
CSS
*{
padding00;
margin:0;
background:lightblue;
}
.card{
padding:50px;
display: flex;
align-items: center;
justify-content: center;
}
button{
width:150px;
padding:10px;
margin:20px;
background:lightgray;
color:white;
border-radius:50px;
border:2px solid gray;
}
button:hover{
background:white;
color:lightblue;
border:2px dashed lightblue;
font-weight:800;
}
JavaScript
function myFunction(){
alert('謝謝您對我們的衣服有興趣!請致電 0987-654-321,會有專人提供您報價!');
}
function myFactory(){
alert('我們工廠位於新北市,通過國際 ISO9001 認證,品質讓您放心!');
}