html 人物介绍 轮播,jQuery卡通人物介绍卡牌轮播切换代码

特效描述:jQuery 卡通人物介绍 卡牌轮播切换。jQuery卡通人物介绍卡牌轮播切换代码

代码结构

1. 引入CSS

2. 引入JS

3. HTML代码

barbarian

Level 4
The Barbarian

The Barbarian is a kilt-clad Scottish warrior with an angry, battle-ready expression, hungry for destruction. He has Killer yellow horseshoe mustache.

archer

Level 5
The Archer

The Archer is a female warrior with sharp eyes. She wears a short, light green dress, a hooded cape, a leather belt and an attached small pouch.

giant

Level 5
The Giant

Slow, steady and powerful, Giants are massive warriors that soak up huge amounts of damage. Show them a turret or cannon and you'll see their fury unleashed!

goblin

Level 5
The Goblin

These pesky little creatures only have eyes for one thing: LOOT! They are faster than a Spring Trap, and their hunger for resources is limitless.

wizard

Level 6
The Wizard

The Wizard is a terrifying presence on the battlefield. Pair him up with some of his fellows and cast concentrated blasts of destruction on anything, land or sky!

(function() {

var slideContainer = $('.slide-container');

slideContainer.slick();

$('.clash-card__image img').hide();

$('.slick-active').find('.clash-card img').fadeIn(200);

// On before slide change

slideContainer.on('beforeChange', function(event, slick, currentSlide, nextSlide) {

$('.slick-active').find('.clash-card img').fadeOut(1000);

});

// On after slide change

slideContainer.on('afterChange', function(event, slick, currentSlide) {

$('.slick-active').find('.clash-card img').fadeIn(200);

});

})();

以下是一个简单的人物介绍HTML 和 CSS 代码示例: ```html <!DOCTYPE html> <html> <head> <title>人物介绍</title> <meta charset="utf-8"> <style> .container { display: flex; flex-direction: row; align-items: center; justify-content: center; margin-top: 50px; } .profile-image { width: 200px; height: 200px; border-radius: 50%; object-fit: cover; margin-right: 50px; } .profile-info { font-family: Arial, sans-serif; font-size: 18px; } h1 { font-size: 36px; font-weight: bold; margin-bottom: 20px; } p { margin-top: 5px; margin-bottom: 5px; } </style> </head> <body> <div class="container"> <img class="profile-image" src="profile-image.jpg" alt="Profile Image"> <div class="profile-info"> <h1>张三</h1> <p>出生日期:1990年1月1日</p> <p>职业:教师</p> <p>教育背景:本科学位</p> <p>工作经历:5年</p> <p>个人简介:张三是一位优秀的教师,具有丰富的教学经验和深厚的学术背景。他在多个领域都有深入的研究,并取得了显著的成果。他的课堂风趣幽默,深受学生喜爱。</p> </div> </div> </body> </html> ``` 在这个代码中,我们首先定义了一个 `container` 类来对页面进行布局。这个类使用了 Flexbox 布局,将图像和个人简介信息进行了横向排列。接着,我们定义了一个 `profile-image` 类来调整头像的尺寸和样式,并使用了 `object-fit` 属性来调整图片的填充方式。最后,我们使用了一些简单的 CSS 样式来设置标题和文本的样式。 在 HTML 部分,我们使用了 `img` 标签来插入头像图片,使用 `h1` 标签来定义标题,使用 `p` 标签来定义文本段落。在 CSS 部分,我们使用了 `.profile-image` 和 `.profile-info` 类来设置样式。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值