JSFiddle - React, Tailwind, and code Playground

by evon0306

HTML

<script src="https://kit.fontawesome.com/41e2a8dba7.js" crossorigin="anonymous"></script>
<button class="order" onclick="order()">
   <i class="fa-regular fa-pen-to-square"></i>
   <div>我要訂購</div>
</button>

<button class="industry" onclick="industry()">
   <i class="fa-solid fa-industry"></i>
   <div>認識工廠</div>
</button>

CSS

* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  border: none;
}

button {
  height: 130px;
  width: 130px;
  padding: 1.5rem;
  margin: 1rem;
  border-radius: 50%;
  background-color: rgb(255, 255, 255);
  transition: all 0.3s ease;
  box-shadow: 0 0 7px rgba(0, 0, 0, 0.43);
  cursor: pointer;
}
button:hover {
  background-color: rgba(0, 99, 56, 0.859);
  color: white;
}

.order i {
  font-size: 2.5rem;
  margin-bottom: 0.4rem;
}
.order div {
  font: 1.5em sans-serif;
}

.industry i {
  font-size: 2.5rem;
  margin-bottom: 0.4rem;
}
.industry div {
  font: 1.5em sans-serif;
}

JavaScript

function order()
{
  alert('謝謝您對我們的衣服有興趣!請致電 0987-654-321,會有專人提供您報價!');
}
function industry()
{
  alert('我們工廠位於新北市,通過國際 ISO9001 認證,品質讓您放心!');
}