Skip to content

Commit f3d1b4b

Browse files
committed
make center element text-typing
1 parent 93dbbdb commit f3d1b4b

File tree

2 files changed

+22
-5
lines changed

2 files changed

+22
-5
lines changed

css/main.css

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,36 @@
1+
* {
2+
box-sizing: border-box;
3+
}
4+
15
html,body {
26
margin: 0px;
37
padding: 0px;
48
}
59

610
.main {
7-
width: 100vh;
11+
width: 100%;
812
height: 100vh;
913
margin:0px;
1014
padding:0px;
15+
position:relative;
1116
}
1217

1318
.text-typing {
14-
display: flex;
19+
display:flex;
20+
justify-content:center;
21+
margin-left: auto;
22+
margin-right: auto;
23+
vertical-align: bottom;
1524
}
1625

1726
h1 {
18-
font-family:'consolas';
27+
font-family:'consolas' !important;
28+
}
29+
30+
.typed-cursor {
31+
opacity: 1;
32+
font-size: 30px;
33+
font-weight: bolder;
34+
margin: 20px 2px;
35+
vertical-align: baseline;
1936
}

index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<meta charset="UTF-8">
55
<meta http-equiv="X-UA-Compatible" content="IE=edge">
66
<meta name="viewport" content="width=device-width, initial-scale=1.0">
7-
<title>Hello, I'am Zaka</title>
7+
<title>Hello, I'm Zaka</title>
88
<!-- Link CSS -->
99
<link rel="stylesheet" type="text/css" href="css/main.css">
1010
<!-- javascript -->
@@ -27,7 +27,7 @@ <h1 id="element"></h1>
2727
<!-- script in the end off body -->
2828
<script>
2929
var typed = new Typed('#element', {
30-
strings: ["Hello, I'm Zaka ^1000","Hello, I'm a programmer ^1000", "I focus on web development ^2000"],
30+
strings: ["Hello, I'm Zaka ^2000","Hello, I'm a programmer ^1000", "I focus on web development ^2500"],
3131
// smartBackspace : true,
3232
typeSpeed: 50,
3333
backSpeed: 15,

0 commit comments

Comments
 (0)