html用户引导动画制作,HTML5 用户注册引导卡片

CSS

语言:

CSSSCSS

确定

html {

height: 100%;

}

body {

/* For Safari 5.1 to 6.0 */

background: -webkit-linear-gradient(#348ac7, #7474bf);

/* For Opera 11.1 to 12.0 */

background: -o-linear-gradient(#348ac7, #7474bf);

/* For Firefox 3.6 to 15 */

background: -moz-linear-gradient(#348ac7, #7474bf);

background: linear-gradient(#348ac7, #7474bf);

}

.card {

position: absolute;

top: 50%;

left: 50%;

transform: translate(-50%, -60%);

-webkit-transform: translate(-50%, -60%);

-webkit-touch-callout: none;

-webkit-user-select: none;

-moz-user-select: none;

-ms-user-select: none;

user-select: none;

}

.box {

background-color: white;

width: 400px;

height: 235px;

border-radius: 5px;

}

.box h1 {

font-family: 'Lato', sans-serif;

font-weight: 400;

font-size: 21pt;

padding-left: 25px;

padding-top: 20px;

}

.box p {

font-family: 'Lato', sans-serif;

font-weight: 300;

padding-left: 25px;

padding-right: 40px;

color: black;

}

.tri {

width: 0;

height: 0;

border-left: 25px solid transparent;

border-right: 25px solid transparent;

border-bottom: 25px solid white;

margin-left: 45px;

margin-bottom: -20px;

}

#back {

width: 60px;

height: 40px;

display: inline-block;

cursor: pointer;

-webkit-touch-callout: none;

-webkit-user-select: none;

-moz-user-select: none;

-ms-user-select: none;

user-select: none;

}

#back p {

text-align: center;

color: #3498db;

font-family: sans-serif;

}

#next {

display: inline-block;

float: right;

background: #3498db;

height: 40px;

width: 75px;

cursor: pointer;

border-radius: 0 0 5px;

}

#next p {

margin-left: -3px;

color: white;

text-align: center;

font-family: sans-serif;

}

#progress {

display: inline-block;

width: 168px;

margin-left: 45px;

}

.bubble {

width: 10px;

height: 10px;

background-color: #daecf9;

display: inline-block;

border-radius: 12.5px;

position: absolute;

}

.connector {

display: inline-block;

width: 50px;

height: 2px;

background-color: #daecf9;

vertical-align: middle;

margin-right: -0.25em;

margin-top: -6px;

margin-left: 6px;

}

.bubble-fill {

background-color: #3498db;

}

.tap {

margin-left: 1.5px;

}

.bottom-element {

height: 40px;

width: 400px;

position: absolute;

bottom: 0;

}

.social {

text-align: center;

}

.twitter {

color: #3177a5;

font-family: sans-serif;

text-decoration: none;

}

.twitter:hover {

color: #ecf0f1;

}

.github {

color: #3177a5;

font-family: sans-serif;

text-decoration: none;

}

.github:hover {

color: #ecf0f1;

}

p {

color: #2c6a9a;

}

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
这是可以实现利用滚动视图实现效果很不错的用户指引界面功能。支持引导页面的自动滑动和手动滑动。两个页面之间的过渡是渐隐渐现(淡入淡出 fade in and fade out)的动画效果。指引页面的文字有固定文字标题和随着页面切换而切换的文字标题。这种用户指引界面用在Path 3.0 App中。由于用了auto layout,所以只支持iOS 6.0 以上。若在iOS 5.0或以下运行,页面切换会有跳动的感觉。 使用方法: 设置每个页面的图片以及相应的文字: // Init the pages texts, and pictures. ICETutorialPage *layer1 = [[ICETutorialPage alloc] initWithSubTitle:@"Picture 1" description:@"Champs-Elysées by night" pictureName:@"tutorial_background_00@2x.jpg"]; ICETutorialPage *layer2 = [[ICETutorialPage alloc] initWithSubTitle:@"Picture 2" description:@"The Eiffel Tower with cloudy weather" pictureName:@"tutorial_background_01@2x.jpg"]; [...] // Load into an array. NSArray *tutorialLayers = @[layer1,layer2,layer3,layer4,layer5]; 加载指引页面: self.viewController = [[ICETutorialController alloc] initWithNibName:@"ICETutorialController_iPhone" bundle:nil andPages:tutorialLayers]; // Set the common styles, and start scrolling (auto scroll, and looping enabled by default) [self.viewController setCommonPageSubTitleStyle:subStyle]; [self.viewController setCommonPageDescriptionStyle:descStyle]; // Set button 1 action. [self.viewController setButton1Block:^(UIButton *button){ NSLog(@"Button 1 pressed."); }]; // Set button 2 action, stop the scrolling. __unsafe_unretained typeof(self) weakSelf = self; [self.viewController setButton2Block:^(UIButton *button){ NSLog(@"Button 2 pressed."); NSLog(@"Auto-scrolling stopped."); [weakSelf.viewController stopScrolling]; }]; // Run it. [self.viewController star
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值