Welcome to my website U-GINE MEDIA. In this website I teach tutorials and share source code on some programming (HTML, CSS, JavaScript, React) tutorials.
Before we get started, do well to subscribe to my channel to never miss out on any update that I post every single day.
You can also visit my GitHub where I upload all the code I have.
In this tutorial topic "How To Create a Frontend Portfolio Website Using HTML & CSS", we will learn how to create it following these simple easy steps.
Share this to your programmer friends. If y'all learnt something today, make sure to let me in the comments.
Get Source Code.
If interested in watching the video before running the code below, you can click the play button to get started.
Code Begins
- First, create a folder with any name you like. Then, make the necessary files inside it.
- Create a file called index.html to serve as the main file.
- Create a file called style.css for the CSS code.
- Finally, download the Images folder and put it in your project directory. This folder contains default showcase images for the website. You can also use your own images.
To start, add the following HTML codes to your index.html file. These codes include essential HTML markup with different semantic tags, such as div, form, input, button, image, etc., to build the website layout.
<div class="container">
<div class="header">
<h1><span>A.</span>bo</h1>
<ul>
<li><a href="">Home</a></li>
<li><a href="">About</a></li>
<li><a href="">Portfolio</a></li>
<li><a href="">Contact</a></li>
</ul>
</div>
<div class="content">
<div class="content-text">
<h2>Hi,</h2>
<h2>I'm <span>Abo Jack,</span></h2>
<h2>a frontend developer</h2>
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Illum quod vitae tempora beatae nisi aliquid mollitia! Accusamus suscipit perferendis sed, tenetur harum possimus hic porro ea, beatae vel molestiae neque.</p>
<div class="social">
<a href=""><ion-icon name="logo-facebook"></ion-icon></a>
<a href=""><ion-icon name="logo-instagram"></ion-icon></a>
<a href=""><ion-icon name="logo-github"></ion-icon></a>
<a href=""><ion-icon name="logo-twitter"></ion-icon></a>
</div>
<div class="buttons">
<button>Get in Touch</button>
<button>Download CV</button>
</div>
</div>
<div class="content-img">
<div class="rotating-border"></div>
<img src="./img/user.jpg" alt="user" />
</div>
</div>
</div>
<script type="module" src="https://unpkg.com/ionicons@7.1.0/dist/ionicons/ionicons.esm.js"></script>
<script nomodule src="https://unpkg.com/ionicons@7.1.0/dist/ionicons/ionicons.js"></script>
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@100;300;400;500;700&display=swap');
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
position: relative;
font-family: "Poppins", sans-serif;
min-height: 100vh;
background-image: url("./img/bg.jpg");
background-size: contain;
background-position: center;
background-repeat: no-repeat;
background-color: #000;
}
.container {
position: absolute;
top: 50%;
left: 50%;
width: 95%;
height: 90%;
transform: translate(-50%, -50%);
background: rgba(255, 255, 255, 0.1);
backdrop-filter: blur(5px);
border-radius: 5px;
}
.header {
display: flex;
align-items: center;
justify-content: space-between;
width: 90%;
margin: 0 auto;
margin-top: 10px;
}
.header h1 {
font-size: 2.5em;
color: #fff;
}
.header h1 span {
color: #ff0000;
margin-right: 1px;
}
.header ul {
list-style: none;
}
.header ul li {
display: inline-block;
margin-left: 20px;
}
.header ul li a {
text-decoration: none;
font-size: 1.2em;
color: #fff;
padding: 5px 10px;
border-radius: 5px;
transition: all 0.3s ease-in-out;
}
.header ul li a:hover {
background: #ff0000;
color: #fff;
}
.content {
display: flex;
justify-content: space-between;
align-items: center;
width: 90%;
height: 90%;
margin: 0 auto;
}
.content-text h2 {
color: #fff;
font-size: 2.5em;
text-transform: capitalize;
}
.content-text h2 span {
color: #ff0000;
}
.content-text p {
font-size: 1.2em;
margin-top: 10px;
max-width: 800px;
color: #fff;
}
.social {
display: flex;
align-items: center;
gap: 20px;
margin: 20px 0;
}
.social a {
font-size: 1.5em;
color: #fff;
transition: all 0.3s ease-in-out;
}
.social a:hover {
color: #ff0000;
}
.buttons {
display: flex;
align-items: center;
gap: 20px;
}
.buttons button {
border: none;
padding: 10px 20px;
font-size: 1.2em;
border-radius: 5px;
cursor: pointer;
transition: all 0.3s ease-in-out;
}
.buttons button:nth-child(1) {
background: #fff;
color: #000;
}
.buttons button:nth-child(2) {
background: #ff0000;
color: #fff;
}
.buttons button:nth-child(1):hover {
background: #ff0000;
color: #fff;
}
.buttons button:nth-child(2):hover {
background: #fff;
color: #000;
}
.content-img {
position: relative;
width: 400px;
height: 400px;
overflow: visible;
}
.content-img img {
width: 100%;
height: 100%;
object-fit: cover;
object-position: center;
display: block;
border-radius: 50%;
z-index: 1;
}
.rotating-border {
position: absolute;
width: 440px;
height: 440px;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
border: 5px solid transparent;
border-top: 5px solid #ff0000;
border-bottom: 5px solid #ff0000;
border-radius: 50%;
z-index: 2;
pointer-events: none;
animation: spin 2s linear infinite;
}
@keyframes spin {
0% {
transform: translate(-50%, -50%) rotate(0deg);
}100% {
transform: translate(-50%, -50%) rotate(360deg);
}
}
0 Comments
We are happy to hear from you.