Here's a unique spinning loading bar with a ranch/western theme, featuring a horseshoe design:
html Copy code
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Ranch Loading Screen</title>
<style>
body {
margin: 0;
padding: 0;
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
background: linear-gradient(to bottom, #87CEEB 0%, #F4E4C1 50%, #D2B48C 100%);
font-family: 'Georgia', serif;
overflow: hidden;
}
.loader-container {
position: relative;
width: 200px;
height: 200px;
}
/* Horseshoe spinner */
.horseshoe {
width: 120px;
height: 120px;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
animation: spin 2s linear infinite;
}
.horseshoe::before {
content: '';
position: absolute;
width: 100%;
height: 100%;
border: 12px solid #8B4513;
border-radius: 50% 50% 0 0;
border-bottom: none;
box-shadow:
inset 0 3px 0 #D2691E,
0 2px 4px rgba(0,0,0,0.3);
}
/* Nail holes on horseshoe */
.horseshoe::after {
content: '• • • • • •';
position: absolute;
width: 100%;
top: 15px;
text-align: center;
font-size: 16px;
color: #654321;
letter-spacing: 8px;
}
/* Spinning animation */
@keyframes spin {
0% { transform: translate(-50%, -50%) rotate(0deg); }
100% { transform: translate(-50%, -50%) rotate(360deg); }
}
/* Loading text */
.loading-text {
position: absolute;
bottom: -50px;
left: 50%;
transform: translateX(-50%);
font-size: 24px;
color: #8B4513;
font-weight: bold;
text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}
/* Animated dots */
.dots {
display: inline-block;
animation: dotAnimation 1.5s infinite;
}
@keyframes dotAnimation {
0%, 20% { content: '.'; }
40% { content: '..'; }
60% { content: '...'; }
100% { content: '...'; }
}
/* Ranch fence decoration */
.fence {
position: absolute;
bottom: 0;
width: 100%;
height: 60px;
background: repeating-linear-gradient(
90deg,
#8B4513,
#8B4513 15px,
transparent 15px,
transparent 35px
);
opacity: 0.3;
}
.fence::before {
content: '';
position: absolute;
width: 100%;
height: 8px;
background: #8B4513;
top: 20px;
opacity: 0.5;
}
/* Tumbleweeds */
.tumbleweed {
position: absolute;
width: 30px;
height: 30px;
background: radial-gradient(circle, #D2B48C, #8B6914);
border-radius: 50%;
opacity: 0.6;
animation: tumble 8s infinite linear;
}
.tumbleweed::before,
.tumbleweed::after {
content: '';
position: absolute;
width: 100%;
height: 100%;
background: inherit;
border-radius: inherit;
opacity: 0.8;
}
.tumbleweed::before {
transform: rotate(60deg);
}
.tumbleweed::after {
transform: rotate(-60deg);
}
.tumbleweed1 {
bottom: 80px;
animation-delay: 0s;
}
.tumbleweed2 {
bottom: 120px;
animation-delay: 3s;
}
@keyframes tumble {
0% {
left: -50px;
transform: rotate(0deg);
}
100% {
left: calc(100% + 50px);
transform: rotate(720deg);
}
}
/* Progress percentage */
.progress-percent {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
font-size: 20px;
color: #8B4513;
font-weight: bold;
text-shadow: 1px 1px 2px rgba(255,255,255,0.5);
}
</style>
</head>
<body>
<div class="loader-container">
<div class="horseshoe"></div>
<div class="progress-percent">0%</div>
<div class="loading-text">Saddling Up<span class="dots">...</span></div>
</div>
<div class="fence"></div>
<div class="tumbleweed tumbleweed1"></div>
<div class="tumbleweed tumbleweed2"></div>
<script>
// Simulate loading progress
let progress = 0;
const progressElement = document.querySelector('.progress-percent');
const loadingText = document.querySelector('.loading-text');
const loadingMessages = [
"Saddling Up",
"Rounding Up Cattle",
"Checking the Fence",
"Feeding the Horses",
"Opening the Gates"
];
const interval = setInterval(() => {
progress += Math.floor(Math.random() * 15) + 5;
if (progress >= 100) {
progress = 100;
clearInterval(interval);
// You can redirect or hide the loader here
setTimeout(() => {
alert('Welcome to the Ranch!');
// window.location.href = '/homepage';
}, 500);
}
progressElement.textContent = progress + '%';
// Change loading message based on progress
const messageIndex = Math.floor(progress / 20);
if (messageIndex < loadingMessages.length) {
loadingText.innerHTML = loadingMessages[messageIndex] + '<span class="dots">...</span>';
}
}, 800);
// Animated dots
let dotCount = 0;
setInterval(() => {
dotCount = (dotCount + 1) % 4;
const dots = document.querySelector('.dots');
dots.textContent = '.'.repeat(dotCount || 1);
}, 500);
</script>
</body>
</html>
The loader automatically progresses from 0-100% with randomized increments to simulate real loading. When it reaches 100%, it displays a welcome message (you can replace this with actual page navigation).
The design captures the essence of a ranch with its rustic colors, western elements, and smooth animations that keep users engaged while content loads.