支持tab键盘选择的折叠框效果

代码语言:html

所属分类:选项卡

代码描述:支持tab键盘选择的折叠框效果

代码标签: 选择 折叠 效果

下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">

<style>
/* CSS Reset */

html, body {
	font-size: 100%;
}

html, body, header, footer, main, section, div, 
h1, h2, p, button {
	margin: 0;
	padding: 0;
	border: 0;
	vertical-align: baseline;
}

header, footer, main, section {
	display: block;
}

button, svg {
	box-sizing: border-box;
}

@-ms-viewport	{ width: device-width; }
@-o-viewport		{ width: device-width; }
@viewport		{ width: device-width; }

/* Common Settings */

body {
	font-family: "Roboto", "Arial", "Helvetica", sans-serif;
	line-height: 1.8;
	color: #000000;
	background-color: #FFFFFF;
}

header, footer, main {
	margin: 2rem auto;
	width: 90%;
}

@media all and (min-width: 37rem) {
header, footer, main {
	width: 80%;
}
}

@media all and (min-width: 50rem) {
header, footer, main {
	width: 40rem;
}
}

header {
	border-bottom: 2px solid #D5D5D5;
}

footer {
	margin-top: 4rem;
	margin-bottom: 8rem;
	border-top: 2px solid #D5D5D5;
	padding-top: 1rem;
}

.no-break {
	white-space: nowrap;
}

/* The Headings h1 and h2 */

h1 {
	font-size: 1.4rem;
	font-weight: bold;
	line-height: 1.6;
	margin: 2rem 0 0.5rem 0;
}

@media all and (min-width: 37rem) {
h1 {
	margin: 3rem 0 1rem 0;
}
}

@media all and (min-width: 50rem) {
h1 {
	margin: 4rem 0 1.5rem 0;
}
}

h2 {
	font-size: 1.1rem;
	font-weight: bold;
	line-height: 1.6;
	margin: 1.5rem 0 0.5rem 0;
}

@media all and (min-width: 50rem) {
h2 {
	margin: 2rem 0 1rem 0;
}
}

/* Collapsible Content Styling */

.special-div {
	margin-top: -0.8rem;
	padding: 0.5rem 0.3rem 1rem 1rem;
	border: 2px solid #D5D5D5;
	border-radius: 0 0 0.5rem 0.5rem;
	background-color: #FFFFFF;
}

@media all and (min-width: 37rem) {
.special-div {
	padding: 1rem 0.5rem 1.5rem 1rem;
}
}

@media all and (min-width: 50rem) {
.special-div {
	margin-top: -1.3rem;
.........完整代码请登录后点击上方下载按钮下载查看

网友评论0