Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ add another resource

JavaScript

Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Auto Save

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <section class="hero-section" style="background-image: url(https://imgpanda.com/upload/ib/NAowDilGn0.jpg);">
		<div class="inner-container">
			<div class="row">
				<div class="hero-inner" style="background-image: url(https://imgpanda.com/upload/ib/iElC7PP9HS.png);">
					<div class="hero-inner-wrap">
						<p class="sub-heading">Savor the Flavors of Italy</p>
						<div class="heading-slider">
							<h1 class="main-heading">
								<span class="outline-heading">Great Dinning</span>
								<span class="creative-heading" data-text='["Experience", "Restaurant"]'>
									<span class="creative-text"></span>
								</span>
							</h1>
						</div>
						<a href="https://creativesalahu.com/about/" title="About Us" class="creative-btn"><span class="btn-heading" data-text="About Us">About Us</span> <span class="btn-icon"><i class="fa-solid fa-arrow-right"></i></span></a>
						<img src="https://imgpanda.com/upload/ib/iO4orbuunn.png" class="animated-banner" alt="">
					</div>
				</div>
			</div>
		</div>
	</section>
<footer class="sticky-footer">
  <div class="container">
  <div class="footer-row">
    <div class="creditd"><a href="https://www.fiverr.com/creativesalahu/customize-or-fix-your-wordpress-website-errors-and-bugs" title="Contact on Fiverr">Want to integrate this design into a WordPress website?</a></div>
  <div class="social">
    <ul>
      <li>
        <a href="https://www.fiverr.com/creativesalahu" title="Fiverr"><img src="https://img.icons8.com/?size=100&id=ngc6JsBomclm&format=png&color=000000" alt="Contact on Fiverr"></a></li>
      <li>
    <a href="https://www.upwork.com/freelancers/~018d2497192b640611" title="Upwork">
      <img src="https://img.icons8.com/?size=100&id=whwDjQbvJcmB&format=png&color=000000" alt="Contact on Upwork">
    </a>
    </li>
      <li><a href="https://www.linkedin.com/in/salahudeen-447a961b1/" title="LinkedIn"><img src="https://img.icons8.com/?size=100&id=xuvGCOXi8Wyg&format=png&color=000000" alt="Contact on LinkedIn"></a></li>
    </ul>
  </div>
  </div>
    </div>
</footer>
              
            
!

CSS

              
                @import url('https://fonts.googleapis.com/css2?family=Schibsted+Grotesk:ital,wght@0,400..900;1,400..900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&display=swap');
body{
	font-size: 17px;
	line-height: 30px;
	font-weight: 400;
	-moz-osx-font-smoothing: grayscale;
	word-break: break-word;
	-webkit-font-smoothing: antialiased;
	font-family: "Schibsted Grotesk", sans-serif;
	margin: 0;
}
section.hero-section {
	height: auto;
	position: relative !important;
	background-size: cover !important;
	overflow: hidden;
	background-attachment: fixed !important;
	background-position: center center !important;
  padding-top:20px;
  padding-bottom:20px;
}
section.hero-section .inner-container {
	height: 100% !important;
	max-width: 1140px;
	padding-right: 15px;
	padding-left: 15px;
	margin-right: auto;
	margin-left: auto;
}
section.hero-section .inner-container  .row {
	display: flex;
	justify-content: center;
	align-items: center;
	height: 100%;
}
.hero-inner {
	background-color: #d39121;
	display: flex;
	position: relative;
	justify-content: center;
	align-items: center;
	height: 700px;
	width: 700px;
	margin-left: auto;
	margin-right: auto;
	border-radius: 50%;
	animation: animeTranslateOpacity 800ms ease-out 100ms forwards;
}
/* Keyframes for the translateY and opacity animation */
@keyframes animeTranslateOpacity {
	0% {
		transform: translateY(0);
		opacity: 0;
	}
	100% {
		transform: translateY(0);
		opacity: 1;
	}
}
.hero-inner-wrap {
	text-align: center;
	width: 100%;
}
p.sub-heading {
	font-size: 26px;
	line-height: 38px;
	letter-spacing: 1px;
	margin-top: 10px;
	margin-bottom: 25px;
	text-transform: uppercase;
	font-weight: bold;
	color: #000;
	font-family: "Bebas Neue", sans-serif;
}
.main-heading {
	line-height: 4.25rem;
	font-size: 6.875rem;
	text-transform: uppercase;
	margin: 0px;
	font-family: "Bebas Neue", sans-serif;
	position: relative;
}
.main-heading span.outline-heading{
	-webkit-text-fill-color: #d39121;
	-webkit-text-fill-color: transparent;
	-webkit-text-stroke-color: #ffffff;
	-webkit-text-stroke-width: 1px;  
}
.creative-heading {
	    perspective: 1000px;
    color: #fff;
    position: relative;
}

.creative-text {
    display: inline-block;
    white-space: nowrap;
    position: relative;
    line-height: normal
}

.splitting-char {
	display: inline-block;
	opacity: 0;
	transform: rotateX(70deg);
	transition: transform 0.3s ease-out, opacity 0.3s ease-out;
}

.creative-text.show .splitting-char {
	opacity: 1;
	transform: rotateX(0);
}

.creative-text.hide .splitting-char {
	opacity: 0;
	transform: rotateX(70deg);
}
.creative-btn{
    background-color: #282725;
    color: #ffffff;
    text-decoration: none;
    font-size: 18px;
    padding: 19px 32px 16px;
    border-radius: 4px;
    font-family: "Bebas Neue", sans-serif;
    display: inline-flex;
    column-gap: 10px;
    overflow: hidden;
    -webkit-transition: all .3s ease-in-out;
    transition: all .3s ease-in-out;

}
.creative-btn .btn-heading {
    transition: opacity .65s, transform .85s;
    transition-timing-function: cubic-bezier(.15,.85,.31,1);
}
.creative-btn .btn-heading:before{
	    content: attr(data-text);
    display: inline-block;
    position: absolute;
    white-space: nowrap;
    top: 50%;
    opacity: 0;
    left: 50%;
    transform: translate(-50%, 100%);
    transition: opacity .5s, transform .8s;
    transition-timing-function: cubic-bezier(.15,.85,.31,1);
}

.creative-btn:hover .btn-heading:before {
    transform: translate(-50%, 150%);
    opacity: 1;
}
.creative-btn:hover .btn-heading {
    transform: translateY(-200%);
}
.creative-btn:hover{
	-webkit-box-shadow: 0 8px 30px 0 rgba(0, 0, 0, .15);
    box-shadow: 0 8px 30px 0 rgba(0, 0, 0, .15);
    -webkit-transform: translate3d(0, -2px, 0);
    transform: translate3d(0, -2px, 0);
}
img.animated-banner {
    right: -50px;
    position: absolute;
    bottom: 50px;
    animation: float 2s linear .5s infinite alternate both;
    max-width: 100%;
    height: auto;
    display: inline-block !important;
}
/* Float animation */ 
.animation-float { 
    animation: float 2000ms linear 500ms infinite alternate both; 
} 
@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(15px); }
    100% { transform: translateY(30px); }
}
.animation-float-small { 
    animation: float 2000ms linear 500ms infinite alternate both; 
} 
@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(5px); }
    100% { transform: translateY(10px); }
}
/* ======== Sticky Footer ========= */
  .sticky-footer{
       position: fixed;
    width: 100%;
        background: #333;
    z-index: 99;
    bottom: 0;
  }
.sticky-footer .footer-row{
      display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    padding-right: 15px;
}
.creditd a {
    color: #fff;
    text-decoration: none;
    font-weight: bold;
        font-size: 16px;
}
.social ul{
      display: flex;
    list-style-type: none;
    margin: 0;
    padding: 0px;
    column-gap: 10px;
    align-items: center;
}
.social ul li a{
     display: flex;
    background: #fff;
    height: 30px;
    width: 30px;
    border-radius: 4px;
    align-items: center;
    justify-content: center;
}
.social ul li a img{
       max-width: 20px;
}

/* RESPONSIVE IPAD PRO */
@media only screen and (max-width: 1024px) {
section.hero-section{
	    height: 685px;
}
.hero-inner{
	    height: 630px;
    width: 630px;
}
img.animated-banner{
	    bottom: 20px;
}
.main-heading{
	    font-size: 5.875rem;
}
}

/* RESPONSIVE IPAD PRO */
@media only screen and (max-width: 480px) {
.hero-inner {
        height: 320px;
        width: 320px;
        margin-left: 0px;
        margin-right: 0px;
    }
    img.animated-banner{
    	display: none !important;
    }
    p.sub-heading{
    	    margin-top: 10px;
        margin-bottom: 15px;
        font-size: 17px;
    line-height: 24px;
    font-weight: 500;
    }
        .main-heading {
        font-size: 3.5rem;
        line-height: 36px;
    }
    .creative-btn{
    	font-size: 16px;
    padding: 10px 25px 8px;
    }
}
              
            
!

JS

              
                $(document).ready(function() {
    const heading = $('.creative-heading');
    const textData = JSON.parse(heading.attr('data-text'));
    const textElement = $('.creative-text');
    let currentIndex = 0;

    function showWord(index) {
        const currentWord = textData[index];
        const nextIndex = (index + 1) % textData.length;

                // Split text into characters
        const chars = currentWord.split('');
        textElement.empty();
        chars.forEach((char, i) => {
            const span = $('<span></span>')
            .addClass('splitting-char')
            .css('transition-delay', `${i * 0.05}s`)
            .text(char);
            textElement.append(span);
        });

                // Animate in
        textElement.find('.splitting-char').each(function(i, char) {
            setTimeout(() => {
                $(char).css({
                    opacity: 1,
                    transform: 'rotateX(0)'
                });
                    }, i * 50); // Adjust the delay as needed
        });

                // Animate out after a delay
        setTimeout(() => {
            textElement.find('.splitting-char').each(function(i, char) {
                setTimeout(() => {
                    $(char).css({
                        opacity: 0,
                        transform: 'rotateX(70deg)'
                    });
                        }, i * 50); // Adjust the delay as needed
            });
                }, 2000); // Adjust the delay as needed

                // Show the next word
        setTimeout(() => {
            showWord(nextIndex);
                }, 3000); // Adjust the delay to match the hide animation duration + a buffer
    }

            // Start the animation
    showWord(currentIndex);
});
              
            
!
999px

Console