You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

56 lines
1.4 KiB
HTML

2 years ago
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>flex card</title>
<link href="stylesheet.css" rel="stylesheet">
<script src="circletype.min.js"></script>
</head>
<body>
<section>
2 years ago
<div class="card">
<p id="up" class="up">'o ccafè</p>
<p id="down" class="down">the coffee</p>
<img src='./images/coffee.PNG'>
</div>
<div class="card">
<p id="up" class="up">'o ccafè</p>
<p id="down" class="down">the coffee</p>
<img src='./images/coffee.PNG'>
</div>
<div class="card">
<p id="up" class="up">'o ccafè</p>
<p id="down" class="down">the coffee</p>
<img src='./images/coffee.PNG'>
</div>
2 years ago
<div class="card">
<p id="up" class="up">'o ccafè</p>
<p id="down" class="down">the coffee</p>
<img src='./images/coffee.PNG'>
</div>
</section>
</body>
<script>
// new CircleType(document.getElementById("up")).radius(120);
// new CircleType(document.getElementById("down")).dir(-1).radius(120);
// https://www.w3schools.com/js/js_loop_for.asp
var ups = document.querySelectorAll(".up");
for (let i = 0; i < ups.length; i++) {
new CircleType(ups[i]).radius(160);
}
2 years ago
var downs = document.querySelectorAll(".down");
for (let i = 0; i < downs.length; i++) {
new CircleType(downs[i]).dir(-1).radius(160);
}
2 years ago
</script>
2 years ago
</html>