编辑:
图片1代码:
的main.css
body {
font-family: arial;
font-size: 14px;
color: #1D2130;
background-image: linear-gradient(top, rgb(200,225,245) 15%, rgb(240,240,240) 60%);
background-image: -o-linear-gradient(top, rgb(200,225,245) 15%, rgb(240,240,240) 60%);
background-image: -moz-linear-gradient(top, rgb(200,225,245) 15%, rgb(240,240,240) 60%);
background-image: -webkit-linear-gradient(top, rgb(200,225,245) 15%, rgb(240,240,240) 60%);
background-image: -ms-linear-gradient(top, rgb(200,225,245) 15%, rgb(240,240,240) 60%);
background-image: -webkit-gradient(
linear,
left top,
left bottom,
color-stop(0.15, rgb(200,225,245)),
color-stop(0.58, rgb(240,240,240))
);
}
header {
width: 950px;
height: 60px;
}
header img{
float: left;
left: -185px;
margin-top: 10px;
position: absolute;
}
header h2 {
text-align: left;
font-size: 16px;
top: 85px;
margin-left: -200px;
font-weight: thin;
position: absolute;
font-family: Impact, Times, arial;
text-transform: uppercase;
margin-top: 15px;
}
h1 {
font-size: 48px;
text-align: center;
top: 0;
position: relative;
line-height: 1;
margin-top: 50px;
min-width: 650px;
}
h2 {
font-size: 24px;
top: -10px;
text-align: center;
position: relative;
min-width: 650px;
}
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
padding: 0;
margin: 0;
font: inherit;
font-size: 100%;
vertical-align: baseline;
border: 0;
}
/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section {
display: block;
}
body {
line-height: 1;
}
ol, ul {
list-style: none;
}
blockquote, q {
quotes: none;
}
blockquote:before, blockquote:after,
q:before, q:after {
content: '';
content: none;
}
table {
border-spacing: 0;
border-collapse: collapse;
}
body {
font-family: 'Helvetica Neue', Helvetica, Arial, serif;
font-size: 13px;
line-height: 1.5;
color: #000;
}
a {
font-weight: bold;
color: #d5000d;
}
header {
padding-top: 35px;
padding-bottom: 10px;
}
header h1 {
font-size: 48px;
font-weight: bold;
line-height: 1.2;
color: #303030;
letter-spacing: -1px;
}
header h2 {
font-size: 24px;
font-weight: normal;
line-height: 1.3;
color: #aaa;
letter-spacing: -1px;
}
code, pre {
margin-bottom: 30px;
font-family: Monaco, "Bitstream Vera Sans Mono", "Lucida Console", Terminal;
font-size: 12px;
color: #222;
}
code {
padding: 0 3px;
}
pre {
padding: 20px;
overflow: auto;
border: solid 1px #ddd;
}
pre code {
padding: 0;
}
ul, ol, dl {
margin-bottom: 20px;
}
/* COMMON STYLES */
table {
width: 100%;
border: 1px solid #ebebeb;
}
th {
font-weight: 500;
}
td {
font-weight: 300;
text-align: center;
border: 1px solid #ebebeb;
}
form {
padding: 20px;
background: #f2f2f2;
}
/* GENERAL ELEMENT TYPE STYLES */
h1 {
font-size: 2.8em;
}
h2 {
margin-bottom: 8px;
font-size: 22px;
font-weight: bold;
color: #303030;
}
h3 {
margin-bottom: 8px;
font-size: 18px;
font-weight: bold;
color: #d5000d;
}
h4 {
font-size: 16px;
font-weight: bold;
color: #303030;
}
h5 {
font-size: 1em;
color: #303030;
}
h6 {
font-size: .8em;
color: #303030;
}
p {
margin-bottom: 20px;
font-weight: 300;
}
a {
text-decoration: none;
}
p a {
font-weight: 400;
}
blockquote {
padding: 0 0 0 30px;
margin-bottom: 20px;
font-size: 1.6em;
border-left: 10px solid #e9e9e9;
}
ul li {
padding-left: 20px;
list-style: disc inside;
}
ol li {
padding-left: 3px;
list-style: decimal inside;
}
dl dd {
font-style: italic;
font-weight: 100;
}
footer {
padding-top: 20px;
padding-bottom: 30px;
margin-top: 40px;
font-size: 13px;
color: #aaa;
}
footer a {
color: #666;
}
/* MISC */
.clearfix:after {
display: block;
height: 0;
clear: both;
visibility: hidden;
content: '.';
}
.clearfix {display: inline-block;}
* html .clearfix {height: 1%;}
.clearfix {display: block;}
.type-csharp .highlight .s { color: #A31515 }
html {
font-family: sans-serif; /* 1 */
-webkit-text-size-adjust: 100%; /* 2 */
-ms-text-size-adjust: 100%; /* 2 */
}
body {
margin: 0;
}
article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
main,
menu,
nav,
section,
summary {
display: block;
}
audio,
canvas,
progress,
video {
display: inline-block; /* 1 */
vertical-align: baseline; /* 2 */
}
audio:not([controls]) {
display: none;
height: 0;
}
[hidden],
template {
display: none;
}
a {
background-color: transparent;
}
a:active,
a:hover {
outline: 0;
}
abbr[title] {
border-bottom: 1px dotted;
}
b,
strong {
font-weight: bold;
}
dfn {
font-style: italic;
}
h1 {
margin: 0.67em 0;
font-size: 2em;
}
mark {
color: #000;
background: #ff0;
}
small {
font-size: 80%;
}
sub,
sup {
position: relative;
font-size: 75%;
line-height: 0;
vertical-align: baseline;
}
sup {
top: -0.5em;
}
sub {
bottom: -0.25em;
}
img {
border: 0;
}
svg:not(:root) {
overflow: hidden;
}
figure {
margin: 1em 40px;
}
hr {
height: 0;
-moz-box-sizing: content-box;
box-sizing: content-box;
}
pre {
overflow: auto;
}
code,
kbd,
pre,
samp {
font-family: monospace, monospace;
font-size: 1em;
}
button,
input,
optgroup,
select,
textarea {
margin: 0; /* 3 */
font: inherit; /* 2 */
color: inherit; /* 1 */
}
/**
* Address `overflow` set to `hidden` in IE 8/9/10/11.
*/
button {
overflow: visible;
}
button,
select {
text-transform: none;
}
button,
html input[type="button"], /* 1 */
input[type="reset"],
input[type="submit"] {
-webkit-appearance: button; /* 2 */
cursor: pointer; /* 3 */
}
button[disabled],
html input[disabled] {
cursor: default;
}
button::-moz-focus-inner,
input::-moz-focus-inner {
padding: 0;
border: 0;
}
input {
line-height: normal;
}
input[type="checkbox"],
input[type="radio"] {
box-sizing: border-box; /* 1 */
padding: 0; /* 2 */
}
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
height: auto;
}
input[type="search"] {
-webkit-box-sizing: content-box; /* 2 */
-moz-box-sizing: content-box;
box-sizing: content-box;
-webkit-appearance: textfield; /* 1 */
}
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-decoration {
-webkit-appearance: none;
}
fieldset {
padding: 0.35em 0.625em 0.75em;
margin: 0 2px;
border: 1px solid #c0c0c0;
}
legend {
padding: 0; /* 2 */
border: 0; /* 1 */
}
textarea {
overflow: auto;
}
optgroup {
font-weight: bold;
}
table {
border-spacing: 0;
border-collapse: collapse;
}
td,
th {
padding: 0;
}
/* LAYOUT STYLES */
body {
font-family: 'Helvetica Neue', Helvetica, Arial, serif;
font-size: 15px;
font-weight: 400;
line-height: 1.5;
color: #666;
background: #fafafa url(../pictures/body-bg.jpg) 0 0 repeat;
}
p {
margin-top: 0;
}
a {
color: #2879d0;
}
a:hover {
color: #2268b2;
}
header {
padding-top: 40px;
padding-bottom: 40px;
font-family: 'Architects Daughter', 'Helvetica Neue', Helvetica, Arial, serif;
background: #2e7bcf url(../pictures/header-bg.jpg) 0 0 repeat-x;
border-bottom: solid 1px #275da1;
}
header h1 {
width: 540px;
margin-top: 0;
margin-bottom: 0.2em;
font-size: 72px;
font-weight: normal;
line-height: 1;
color: #fff;
letter-spacing: -1px;
}
header h2 {
width: 540px;
margin-top: 0;
margin-bottom: 0;
font-size: 26px;
font-weight: normal;
line-height: 1.3;
color: #9ddcff;
letter-spacing: 0;
}
.inner {
position: relative;
width: 940px;
margin: 0 auto;
}
#content-wrapper {
padding-top: 30px;
border-top: solid 1px #fff;
}
#main-content {
float: left;
width: 690px;
}
#main-content img {
max-width: 100%;
}
aside#sidebar {
float: right;
width: 200px;
min-height: 504px;
padding-left: 20px;
font-size: 12px;
line-height: 1.3;
background: transparent url(../pictures/sidebar-bg.jpg) 0 0 no-repeat;
}
a.button {
width: 134px;
height: 58px;
padding-top: 22px;
padding-left: 68px;
font-family: 'Architects Daughter', 'Helvetica Neue', Helvetica, Arial, serif;
font-size: 23px;
line-height: 1.2;
color: #fff;
}
a.button small {
display: block;
font-size: 11px;
}
header a.button {
position: absolute;
top: 0;
right: 0;
background: transparent url(../pictures/github-button.png) 0 0 no-repeat;
}
aside a.button {
display: block;
width: 138px;
padding-left: 64px;
margin-bottom: 20px;
font-size: 21px;
background: transparent url(../pictures/download-button.png) 0 0 no-repeat;
}
code, pre {
margin-bottom: 30px;
font-family: Monaco, "Bitstream Vera Sans Mono", "Lucida Console", Terminal, monospace;
font-size: 13px;
color: #222;
}
code {
padding: 0 3px;
background-color: #f2f8fc;
border: solid 1px #dbe7f3;
}
pre {
padding: 20px;
overflow: auto;
text-shadow: none;
background: #fff;
border: solid 1px #f2f2f2;
}
pre code {
padding: 0;
color: #2879d0;
background-color: #fff;
border: none;
}
ul, ol, dl {
margin-bottom: 20px;
}
/* COMMON STYLES */
hr {
height: 0;
margin-top: 1em;
margin-bottom: 1em;
border: 0;
border-top: solid 1px #ddd;
}
table {
width: 100%;
border: 1px solid #ebebeb;
}
th {
font-weight: 500;
}
td {
font-weight: 300;
text-align: center;
border: 1px solid #ebebeb;
}
form {
padding: 20px;
background: #f2f2f2;
}
/* GENERAL ELEMENT TYPE STYLES */
#main-content h1 {
margin-top: 0;
margin-bottom: 0;
font-family: 'Architects Daughter', 'Helvetica Neue', Helvetica, Arial, serif;
font-size: 2.8em;
font-weight: normal;
color: #474747;
text-indent: 6px;
letter-spacing: -1px;
}
#main-content h1:before {
padding-right: 0.3em;
margin-left: -0.9em;
color: #9ddcff;
content: "/";
}
#main-content h2 {
margin-bottom: 8px;
font-family: 'Architects Daughter', 'Helvetica Neue', Helvetica, Arial, serif;
font-size: 22px;
font-weight: bold;
color: #474747;
text-indent: 4px;
}
#main-content h2:before {
padding-right: 0.3em;
margin-left: -1.5em;
content: "//";
color: #9ddcff;
}
#main-content h3 {
margin-top: 24px;
margin-bottom: 8px;
font-family: 'Architects Daughter', 'Helvetica Neue', Helvetica, Arial, serif;
font-size: 18px;
font-weight: bold;
color: #474747;
text-indent: 3px;
}
#main-content h3:before {
padding-right: 0.3em;
margin-left: -2em;
content: "///";
color: #9ddcff;
}
#main-content h4 {
margin-bottom: 8px;
font-family: 'Architects Daughter', 'Helvetica Neue', Helvetica, Arial, serif;
font-size: 15px;
font-weight: bold;
color: #474747;
text-indent: 3px;
}
h4:before {
padding-right: 0.3em;
margin-left: -2.8em;
content: "////";
color: #9ddcff;
}
#main-content h5 {
margin-bottom: 8px;
font-family: 'Architects Daughter', 'Helvetica Neue', Helvetica, Arial, serif;
font-size: 14px;
color: #474747;
text-indent: 3px;
}
h5:before {
padding-right: 0.3em;
margin-left: -3.2em;
content: "/////";
color: #9ddcff;
}
#main-content h6 {
margin-bottom: 8px;
font-family: 'Architects Daughter', 'Helvetica Neue', Helvetica, Arial, serif;
font-size: .8em;
color: #474747;
text-indent: 3px;
}
h6:before {
padding-right: 0.3em;
margin-left: -3.7em;
content: "//////";
color: #9ddcff;
}
p {
margin-bottom: 20px;
}
a {
text-decoration: none;
}
p a {
font-weight: 400;
}
blockquote {
padding: 0 0 0 30px;
margin-bottom: 20px;
font-size: 1.6em;
border-left: 10px solid #e9e9e9;
}
ul {
list-style: disc inside;
padding-left: 20px;
}
ol {
list-style: decimal inside;
padding-left: 3px;
}
dl dd {
font-style: italic;
font-weight: 100;
}
footer {
padding-top: 20px;
padding-bottom: 30px;
margin-top: 40px;
font-size: 13px;
color: #aaa;
background: transparent url('../pictures/hr.png') 0 0 no-repeat;
}
footer a {
color: #666;
}
footer a:hover {
color: #444;
}
/* MISC */
.clearfix:after {
display: block;
height: 0;
clear: both;
visibility: hidden;
content: '.';
}
.clearfix {display: inline-block;}
* html .clearfix {height: 1%;}
.clearfix {display: block;}
/* #Media Queries
================================================== */
/* Smaller than standard 960 (devices and browsers) */
@media only screen and (max-width: 959px) { }
/* Tablet Portrait size to standard 960 (devices and browsers) */
@media only screen and (min-width: 768px) and (max-width: 959px) {
.inner {
width: 740px;
}
header h1, header h2 {
width: 340px;
}
header h1 {
font-size: 60px;
}
header h2 {
font-size: 30px;
}
#main-content {
width: 490px;
}
#main-content h1:before,
#main-content h2:before,
#main-content h3:before,
#main-content h4:before,
#main-content h5:before,
#main-content h6:before {
padding-right: 0;
margin-left: 0;
content: none;
}
}
/* All Mobile Sizes (devices and browser) */
@media only screen and (max-width: 767px) {
.inner {
width: 93%;
}
header {
padding: 20px 0;
}
header .inner {
position: relative;
}
header h1, header h2 {
width: 100%;
}
header h1 {
font-size: 48px;
}
header h2 {
font-size: 24px;
}
header a.button {
position: relative;
display: inline-block;
width: auto;
height: auto;
padding: 5px 10px;
margin-top: 15px;
font-size: 13px;
line-height: 1;
color: #2879d0;
text-align: center;
background: #9ddcff none;
border-radius: 5px;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
}
header a.button small {
display: inline;
font-size: 13px;
}
#main-content,
aside#sidebar {
float: none;
width: 100% ! important;
}
aside#sidebar {
min-height: 0;
padding: 20px 0;
margin-top: 20px;
background-image: none;
border-top: solid 1px #ddd;
}
aside#sidebar a.button {
display: none;
}
#main-content h1:before,
#main-content h2:before,
#main-content h3:before,
#main-content h4:before,
#main-content h5:before,
#main-content h6:before {
padding-right: 0;
margin-left: 0;
content: none;
}
}
/* Mobile Landscape Size to Tablet Portrait (devices and browsers) */
@media only screen and (min-width: 480px) and (max-width: 767px) { }
/* Mobile Portrait Size to Mobile Landscape Size (devices and browsers) */
@media only screen and (max-width: 479px) { }
图2代码:
的main.css
body {
font-family: arial;
font-size: 14px;
color: #1D2130;
background-image: linear-gradient(top, rgb(200,225,245) 15%, rgb(240,240,240) 100%);
background-image: -o-linear-gradient(top, rgb(200,225,245) 15%, rgb(240,240,240) 100%);
background-image: -moz-linear-gradient(top, rgb(200,225,245) 15%, rgb(240,240,240) 100%);
background-image: -webkit-linear-gradient(top, rgb(200,225,245) 15%, rgb(240,240,240) 100%);
background-image: -ms-linear-gradient(top, rgb(200,225,245) 15%, rgb(240,240,240) 100%);
background-image: -webkit-gradient(
linear,
left top,
left bottom,
color-stop(0.15, rgb(200,225,245)),
color-stop(0.58, rgb(240,240,240))
);
}
#main-body {
height: 1000px;
width: 60%;
border-top: 0;
text-align: center;
margin-right: auto;
margin-left: auto;
position: relative;
}
header {
width: 950px;
height: 60px;
}
header img{
float: left;
left: -185px;
margin-top: 10px;
position: absolute;
}
header h2 {
text-align: left;
font-size: 16px;
top: 85px;
margin-left: -200px;
font-weight: thin;
position: absolute;
font-family: Impact, Times, arial;
text-transform: uppercase;
margin-top: 15px;
}
h1 {
font-size: 48px;
text-align: center;
top: 0;
position: relative;
line-height: 1;
margin-top: 50px;
min-width: 650px;
}
h2 {
font-size: 24px;
top: -10px;
text-align: center;
position: relative;
min-width: 650px;
}
#meter {
margin-top: 0;
float: left;
width: 72%;
margin-left: auto;
margin-right: auto;
padding-left: 30px;
}
#gauge {
position: absolute;
width: 259px;
opacity: 1;
}
.arrow {
position: absolute;
}
#right-arrow {
width: 192px;
margin-top: 125px;
margin-left: 20px;
}
#hot-arrow {
width: 41px;
margin-top: 32px;
margin-left: 114px;
display: none;
}
#cold-arrow {
width: 77px;
margin-top: 129px;
margin-left: 117px;
display: none;
}
#outputSpace {
width: 75%;
margin-left: auto;
margin-right: auto;
text-align: center;
font-size: 24px;
position: relative;
margin-top: 320px;
color: #1C2130;
opacity: .5;
min-width: 942px;
height: 75px;
}
.output-message {
display: none;
width: 720px;
text-align: center;
float: center;
position: relative;
margin-left: 0;
}
#buttonArea {
margin-top: -35px;
width: 80%;
margin-right: auto;
margin-left: auto;
min-width: 700px;
}
#numberField {
margin: 25px;
width: 60%;
height: 40px;
border-radius: 5px solid gray;
display: inline-block;
left: 0;
color: black;
}
#Button1 {
height: 50px;
width: 15%;
margin-left: 10px;
border-radius: 20px;
border: none;
background-color: #c1300d;
display: inline-block;
color: white;
font-size: 18px;
margin-top: 10px;
}
.content-current
{
display: block !important;
}
index.html(两个页面几乎相同)
<!DOCTYPE html>
<html lang="en" class="no-js" ng-app="developerBlog">
<head>
<meta charset='utf-8'>
<meta http-equiv="X-UA-Compatible" content="chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<link href='https://fonts.googleapis.com/css?family=Architects+Daughter' rel='stylesheet' type='text/css'>
<link rel="stylesheet" type="text/css" href="stylesheets/stylesheet.css" media="screen">
<link rel="stylesheet" type="text/css" href="stylesheets/pygment_trac.css" media="screen">
<link rel="stylesheet" type="text/css" href="stylesheets/print.css" media="print">
<link rel="stylesheet" type="text/css" href="stylesheets/normalize.css" />
<link rel="stylesheet" type="text/css" href="stylesheets/tabs.css" />
<link rel="stylesheet" type="text/css" href="stylesheets/main.css" />
<link data-require="bootstrap-css" data-semver="3.1.1" rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css" />
<link data-require="semantic-ui@*" data-semver="0.9.6" rel="stylesheet" href="https://raw.github.com/Semantic-Org/Semantic-UI/0.9.6/build/packaged/css/semantic.min.css" />
<script data-require="jquery@*" data-semver="2.1.4" src="http://code.jquery.com/jquery-2.1.4.min.js"></script>
<script src="javascripts/modernizr.custom.js"></script>
<script data-require="semantic-ui@*" data-semver="0.9.6" src="https://rawgit.com/Semantic-Org/Semantic-UI/0.9.6/build/packaged/javascript/semantic.min.js"></script>
<script data-require="angular.js@1.3.x" src="http://code.angularjs.org/1.3.15/angular.js" data-semver="1.3.15"></script>
<script src="app.js"></script>
<script src="myDirectives.js"></script>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<title>Danieboy.GitHub.io by Dan Andersson</title>
</head>
<body ng-controller="BlogController as blog">
<svg class="hidden">
<defs>
<path id="tabshape" d="M80,60C34,53.5,64.417,0,0,0v60H80z"></path>
</defs>
</svg>
<header>
<div class="inner">
<h1>Danieboy.GitHub.io</h1>
<h2>Developer blog</h2>
<p class="support">Your browser does not support <strong>flexbox</strong>! <br />Please view this demo with a <strong>modern browser</strong>.</p>
</div>
</header>
<div id="content-wrapper">
<div class="inner clearfix">
<section id="main-content">
<div class="tabs tabs-style-shape">
<nav>
<ul>
<li>
<a href="#section-shape-1">
<svg viewBox="0 0 80 60" preserveAspectRatio="none"><use xlink:href="#tabshape"></use></svg>
<span>Start</span>
</a>
</li>
<li>
<a href="#section-shape-2">
<svg viewBox="0 0 80 60" preserveAspectRatio="none"><use xlink:href="#tabshape"></use></svg>
<svg viewBox="0 0 80 60" preserveAspectRatio="none"><use xlink:href="#tabshape"></use></svg>
<span>Resume</span>
</a>
</li>
<li>
<a href="#section-shape-3">
<svg viewBox="0 0 80 60" preserveAspectRatio="none"><use xlink:href="#tabshape"></use></svg>
<svg viewBox="0 0 80 60" preserveAspectRatio="none"><use xlink:href="#tabshape"></use></svg>
<span>My Projects</span>
</a>
</li>
<li>
<a href="#section-shape-4">
<svg viewBox="0 0 80 60" preserveAspectRatio="none"><use xlink:href="#tabshape"></use></svg>
<svg viewBox="0 0 80 60" preserveAspectRatio="none"><use xlink:href="#tabshape"></use></svg>
<span>Reviews</span>
</a>
</li>
<li>
<a href="#section-shape-5">
<svg viewBox="0 0 80 60" preserveAspectRatio="none"><use xlink:href="#tabshape"></use></svg>
<span>Contact</span>
</a>
</li>
</ul>
</nav>
<div class="content-wrap">
<section id="section-shape-1">
<start></start>
</section>
<section id="section-shape-2">
<resume></resume>
</section>
<section id="section-shape-3">
<myprojects></myprojects>
</section>
<section id="section-shape-4">
<reviews></reviews>
</section>
<section id="section-shape-5">
<contact></contact>
</section>
</div>
</div>
</section>
</div>
</div>
<script src="javascripts/cbpFWTabs.js"></script>
<script>
(function() {
[].slice.call( document.querySelectorAll( '.tabs' ) ).forEach( function( el ) {
new CBPFWTabs( el );
});
})();
</script>
</body>
</html>
上一篇文章:
AngularJS - Loading my directives suddenly not working?
网站:
http://danieboy.github.io/bmi-calculator/index.html
因此,当我修复以便我的标签可以正确显示相应标签的信息,这要归功于@pankajparkar的帮助,添加:
.content-current{display: block !important;}
到我的css文件 - 标题坏了。我会说我在CSS上很糟糕,这就是我要问的原因 - 我更像是一名后端程序员,如果这是一个非常简单的问题我很抱歉,但我想学习更多关于这个。该网站有很多CSS文件,所以我不打算在这里发布。但是你可能知道你可以在谷歌浏览器的网站上按F12 - &gt;来源可以看到它们。
提前致谢!
答案 0 :(得分:1)
因为你的造型很糟糕:P
只需执行此标题即可为您修复..
header {
width: 950px;
height: 150px;
}
或最佳解决方案将高度设置为自动喜欢
header {
width: 950px;
height: auto;
}
此外,如果您想将标题对齐中心
header {
width: 950px;
height: auto;
margin: 0 auto;
}
和最后一件事:D 将此应用于标题底部文字;)
header h2 {
text-align: left;
font-size: 16px;
top: 38px;
font-family: Impact, Times, arial;
text-transform: uppercase;
margin-top: 15px;
position: relative;
}
答案 1 :(得分:1)
在http://danieboy.github.io/上,您的标题高度和宽度都已固定(main.css中的第30行)。只需删除它,它就会对你有用。
在http://danieboy.github.io/bmi-calculator/index.html上,您必须将标题的宽度和高度都设置为自动,然后才能生效。