- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我试图让我的页脚留在页面底部,并且一直在浏览一些 youtube 教程。出于某种奇怪的原因,当我单独尝试页脚时它们确实有效,但是当与我的其他元素结合时,我似乎遇到了一些问题,不仅让页脚位于页面底部,而且我也无法获得我的显示:内联 block 运行良好....
我一直在努力学习这个教程:https://www.youtube.com/watch?v=qlCIXXhSX6Y&t=191s 和 https://www.youtube.com/watch?v=FGBsGqn7ac8&lc=z22eihehdzrajv13qacdp4334oiod53pnruzdum2ru1w03c010c.1541183153454115
我有一个单独的 footer.php 并包含在我的 index.php 文件中……我应该在 index.php 页面还是 footer.php 中包含我的 div id?
这是我的页脚代码:
<!DOCTYPE html>
<html>
<head>
<title></title>
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.4.2/css/all.css" integrity="sha384-/rXc/GQVaYpyDdyxK+ecHPVYJSN9bmVFBvjA/9eOB+pb3F2w2N6fc5qB9Ew5yIns" crossorigin="anonymous">
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<section class="content">
<footer>
<div class="main-footer">
<div class="container">
<div class="row">
<div class="col-md-12">
<div class="footer-bg">
<div class="footer-address">
<h1>Learn Classical Music at <span>PianoCourse101</span></h1>
<h2>Location: Australia, Melbourne</h2>
</div>
<div class="footer-email-phone">
<ul>
<li><a href="tel:+1234567890"><i class="fa fa-phone"></i>+123-456-7890</a></li>
<li><a href="mailto:info@PianoCourse101.com"><i class="fa fa-envelope"></i>info@pianocourse101.com</a></li>
</ul>
</div>
<div class="footer-social-icons">
<ul>
<li><a href="#" target="_blank"><i class="fab fa-facebook"></i></a></li>
<li><a href="#" target="_blank"><i class="fab fa-twitter"></i></a></li>
<li><a href="#" target="_blank"><i class="fab fa-google-plus"></i></a></li>
<li><a href="#" target="_blank"><i class="fab fa-youtube"></i></a></li>
<li><a href="#" target="_blank"><i class="fab fa-linkedin"></i></a></li>
</ul>
</div>
</div>
</div>
<div class="col-md-12">
<div class="footer-menu">
<ul>
<li><a href="#">Home</a></li>
<li><a href="#">More Information</a></li>
<li><a href="#">Contact Us</a></li>
</ul>
</div>
</div>
</div>
</div>
<div class="footer-strip">
<div class="container">
<div class="row">
<div class="col-md-12">
<div class="footer-text">
<p>2018 @ All Rights</p>
</div>
</div>
</div>
</div>
</div>
</footer>
</section>
</body>
</html>
This is my index.php page
<!DOCTYPE html>
<html>
<head>
<title>PianoCourse101</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" type="text/css" href="style.css">
<link href="https://fonts.googleapis.com/css?family=Aldrich|Mr+Dafoe" rel="stylesheet">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.1.0/css/all.css" integrity=">sha384-lKuwvrZot6UHsBSfcMvOkWwlCMgc0TaWr+30HWe3a4ltaBwTZhyTEggF5tJv8tbt" crossorigin="anonymous">
<link href="https://fonts.googleapis.com/css?family=Pacifico" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Great+Vibes|Lobster" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Great+Vibes|Lobster|Monoton|Orbitron" rel="stylesheet">
</head>
<body>
<!DOCTYPE html><html><head><meta charset="utf-8">
<link
rel="stylesheet"
href = "style.css"
media="screen,projection,tv"
>
<link
rel="stylesheet"
href="https://use.fontawesome.com/releases/v5.3.1/css/all.css"
integrity="sha384-mzrmE5qonljUremFsqc01SB46JvROS7bZs3IO2EmfFsd15uHvIt+Y8vEf7N7fWAU"
crossorigin="anonymous">
<link
rel="stylesheet"
href = "https://fonts.googleapis.com/css?family=Pacifico"
>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Welcome to PianoCourse101</title>
<div id="container">
<div id="main">
<header>
<div class="header2_welcome">
<h1>Welcome to PianoCourse101</h1>
</div>
</header>
<section class="content">
<div class="crotchet">
<p>𝅘𝅥</p>
</div>
<div class="minim">
<p>𝅗𝅥</p>
</div>
<div class="quaver">
<p>𝅘𝅥𝅮</p>
</div>
<img class="pc101" src="includes/pictures/pc101.gif" alt="pianocourse101/">
<div class="music"><i class="fas fa-music fa-8x"></i></div>
<div class="sharp"><p>♯</p></div>
<div class="natural"><p>♮</p></div>
<div class="flat"><p>♭</p></div>
<article>
<div class="first">
<h2>At PianoCourse101, your child can now learn how to play Classical music right from the comfort of your own home! We understand that as a busy mum, you might not have the time to take your child for piano lessons and also, it is a daunting process to find a good quality teacher. Put all of those thoughts aside because PianoCourse101 offers a complete course from the beginning to the advanced levels. It is based on "The Bastien Piano Basics Series" for children and for a limited time, students can watch the Primer Level lessons for <span class="first_free">free!</span> If you would like to continue your lessons beyond Primer Level, you can opt to purchase our Level 1, Level 2, or Level 3 course.<br></br>Currently, the lessons are aimed primarily for children but there will be lessons for adults in the near future. We would appreciate if you could donate to our website if you are enjoying your learning experience with us. This will assist us in maintaining our website and to be able to upload more videos.<br></br> Mr Lee has over ten years of piano teaching experience and also has completed an educational degree and obtained a 4th year in psychology degree. We understand that learning the piano can be boring and hence, we are trying our best to make piano learning a fun and interactive experience for you and your child.<br></br>PianoCourse101 is located in Australia, Melbourne and all fees are in the AUD currency. Student will receive an invoice upon the completion of purchasing a course.</h2>
</div>
</article>
<div class="form">
<form class="signup-form" action="newsletters.php" method="POST">
<div class="newsletters">
<label>Enter your E-mail Address</label>
</div>
<br></br>
<div class="index_form"><center><input type="text" name='email' placeholder="Enter E-mail Address"></center>
<br></br>
<center><button type="submit" name="submit">Subscribe to PianoCourse101!</button></center>
<br></br>
</div>
</form>
</div>
<img class="snoopy" src="includes/pictures/snoopy.jpg" alt="snoopy playing the piano" />
<div class="services_heading">Services</div>
<div class="services">
<div class="service1">
<h1>Level 1</h1>
<a href="signup.php"><p id="piano">🎹</p></a>
<p>Purchase the Level 1 Subscriptionplan!<br>Learn how to play the piano right from the comfort of your own home!<br>Monthly fee: $100<br>Yearly fee: $800</p>
</div>
<div class="service1">
<h1>Level 2</h1>
<a href="signup.php"><p id="violin">🎻</p></a>
<p>Purchase the Level 2 Subscriptionplan!<br>Learn how to play the piano right from the comfort of your own home!<br>Monthly fee: $150<br>Yearly fee: $1300</p>
</div>
<div class="service1">
<h1>Level 3</h1>
<a href="signup.php"><p id="sax">🎷</p></a>
<p>Purchase the Level 3 Subscriptionplan!<br>Learn how to play the piano right from the comfort of your own home!<br>Monthly fee: $200<br>Yearly fee: $1800</p>
</div>
</div>
<span class="index_views">There are <span class="views"><?php echo " ",htmlspecialchars($views); ?></span><?php echo " "; ?>visitors who have visited this page!</span>
</section>
<footer id="footer">
<?php include_once 'footer.php'; ?>
</footer>
</div>
</div>
</body>
</html>
这是我的页脚 CSS:
.main-footer {
width: 100%;
height: auto;
background-image: url(includes/pictures/piano.jpg);
-webkit-background-size: cover;
-ms-background-size: cover;
-moz-background-size: cover;
background-size: cover;
background-repeat: no-repeat;
background-attachment: scroll;
background-position: center;
padding: 20px 0px;
}
.footer-bg {
width: 100%;
height: auto;
margin: auto;
padding: 30px;
background-color: #fff;
text-align: center;
border: 4px solid #ff6a00;
}
.footer-address {
width: 100%;
height: auto;
margin: auto;
margin-top:5px;
}
.footer-address h1 {
font-family: Arial, Helvetica, sans-serif;
color: #222;
text-align: center;
font-weight: bold;
text-transform: uppercase;
font-size: 20px;
line-height: 1.5;
}
.footer-address h1 span {
color: #ff6a00;
}
.footer-address h2 {
font-family: Arial, Helvetica, sans-serif;
color: #222;
text-align: center;
font-weight: 500;
text-transform: uppercase;
font-size: 14px;
line-height: 1.5;
}
.footer-email-phone {
width: 100%;
height: auto;
margin: auto;
margin-top: 5px;
}
.footer-email-phone ul {
margin: 0px;
padding: 0px;
text-align: center;
}
.footer-email-phone ul li {
display: inline-block;
}
.footer-email-phone ul li a {
font-family: Arial, Helvetica, sans-serif;
color: #333;
font-weight: 600;
text-transform: uppercase;
font-size: 13px;
padding-left: 20px;
}
.footer-email-phone ul li a i {
color: #ff6a00;
padding-right: 5px;
}
.footer-email-phone ul li a:hover {
color: #ff6a00;
}
.footer-email-phone ul li a:hover i {
color: #333;
}
.footer-social-icons {
width: 100%;
height: auto;
margin: auto;
margin-top: 5px;
}
.footer-social-icons ul {
margin: 0px;
padding: 0px;
text-align: center;
}
.footer-social-icons ul li {
display: inline-block;
width: 30px;
height: 30px;
background: #fff;
margin-right: 10px;
-webkit-box-shadow: 0px 0px 5px 0px rgba(255,106,0,1);
-moz-box-shadow: 0px 0px 5px 0px rgba(255,106,0,1);
box-shadow: 0px 0px 5px 0px rgba(255,106,0,1);
text-align: center;
margin-top: 12px;
}
.footer-social-icons ul li a {
font-size: 15px;
color: #ff6a00;
line-height: 30px;
display: block;
}
.footer-social-icons ul li:nth-child(1):hover {
background: #3b5999;
}
.footer-social-icons ul li:nth-child(2):hover {
background: #55acee;
}
.footer-social-icons ul li:nth-child(3):hover {
background: #dd4b39;
}
.footer-social-icons ul li:nth-child(4):hover {
background: #cd201f;
}
.footer-social-icons ul li:nth-child(5):hover {
background: #0077b5;
}
.footer-social-icons ul li:nth-child(1):hover a{
color: #fff;
}
.footer-social-icons ul li:nth-child(2):hover a{
color: #fff;
}
.footer-social-icons ul li:nth-child(3):hover a{
color: #fff;
}
.footer-social-icons ul li:nth-child(4):hover a{
color: #fff;
}
.footer-social-icons ul li:nth-child(5):hover a{
color: #fff;
}
.footer-menu {
width: 100%;
height: auto;
margin: auto;
margin-top: 10px;
}
.footer-menu ul {
margin: 0px;
padding: 0px;
text-align: center;
}
.footer-menu ul li {
display: inline-block;
}
.footer-menu ul li a {
font-family: Arial, Helvetica, sans-serif;
color: #fff;
text-align: left;
font-weight: 600;
text-transform: uppercase;
font-size: 14px;
}
.footer-menu ul li:after {
content: "|";
font-family: 'FontAwesome';
color: #fff;
margin-left: 8px;
margin-right: 8px;
}
.footer-menu ul li:nth-child(3):after {
content: "";
}
.footer-menu ul li a:hover {
color: #ff6a00;
}
.footer-strip {
width: 100%;
height: auto;
margin: auto;
border-top: 2px solid #fff;
margin-top: 5px;
}
.footer-text {
width: 100%;
height: auto;
margin: auto;
margin-top: 5px;
}
.footer-text p {
font-family: Arial, Helvetica, sans-serif;
color: #fff;
text-align: center;
font-weight: 400;
text-transform: uppercase;
font-size: 13px;
}
.footer-text p a {
font-family: Arial, Helvetica, sans-serif;
color: #fff;
font-weight: 400;
text-transform: uppercase;
font-size: 13px;
}
.footer-text p a:hover {
color: #ff6a00;
}
[enter image description here][1]
最佳答案
页脚所需的所有 html 包括:
<div class="main-footer">
<div class="container">
<div class="row">
<div class="col-md-12">
<div class="footer-bg">
<div class="footer-address">
<h1>Learn Classical Music at <span>PianoCourse101</span></h1>
<h2>Location: Australia, Melbourne</h2>
</div>
<div class="footer-email-phone">
<ul>
<li><a href="tel:+1234567890"><i class="fa fa-phone"></i>+123-456-7890</a></li>
<li><a href="mailto:info@PianoCourse101.com"><i class="fa fa-envelope"></i>info@pianocourse101.com</a></li>
</ul>
</div>
<div class="footer-social-icons">
<ul>
<li><a href="#" target="_blank"><i class="fab fa-facebook"></i></a></li>
<li><a href="#" target="_blank"><i class="fab fa-twitter"></i></a></li>
<li><a href="#" target="_blank"><i class="fab fa-google-plus"></i></a></li>
<li><a href="#" target="_blank"><i class="fab fa-youtube"></i></a></li>
<li><a href="#" target="_blank"><i class="fab fa-linkedin"></i></a></li>
</ul>
</div>
</div>
</div>
<div class="col-md-12">
<div class="footer-menu">
<ul>
<li><a href="#">Home</a></li>
<li><a href="#">More Information</a></li>
<li><a href="#">Contact Us</a></li>
</ul>
</div>
</div>
</div>
</div>
<div class="footer-strip">
<div class="container">
<div class="row">
<div class="col-md-12">
<div class="footer-text">
<p>2018 @ All Rights</p>
</div>
</div>
</div>
</div>
</div>
关于html - 与我的其他元素组合时,我似乎无法让我的页脚位于页面底部,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53129786/
谁能帮我解决这个问题?我有一个 Tomcat 和简单的 JSF 应用程序:https://github.com/gooamoko/jsfbilling/ .当我在 Tomcat 上运行应用程序时,它运
我有两个这样的域类,第一个是 Manager : package com.mnm class Manager { String name; static hasMany = [ pro
当我运行以下代码时,打印输出似乎不正确。 void thread_Calc(int *pos) { printf("recieved %d\n", *pos); sig = -1; man
这个问题在这里已经有了答案: How to access a local variable from a different function using pointers? (10 个答案) 关闭
我编写了一个程序,其中列表构建器方法返回 IEnumerable of string,其中包括大量字符串(100 万个项目),我将其存储在 List of string 中,然后它将所有项目附加到 中
我正在尝试编写一个 IRC 类型的聊天客户端,它具有可以连接到服务器的客户端。我试图让它在本地 atm 上工作(使用 FIFOS 而不是套接字)。 我遇到了以下我似乎无法解决的问题: 接受新的客户端连
我的一个 cronjobs 每天发送一封电子邮件 35 6 * * * cd $EZPUBLISHROOT && $PHP runcronjobs.php -q 2>&1 我停止使用 cron sud
我使用 WPF 打印路径来处理在我们的应用程序中创建的大型图表。整个图表由视觉效果组成。 所谓的“DesignerPaginator”对图表进行分页(非常简单)。 从这一点来说,我做了以下三件事: -
我尝试在更新之前跟踪系统应用程序并使用: public static boolean isSystemApplication(Context ctx, IContent content) {
我在这里附上了一个查询分析结果,https://explain.depesz.com/s/x9BN 这是查询 EXPLAIN ANALYZE SELECT branche
我正在做一个 CXF(spring) 项目 (HUB)。部署后,我可以看到肥皂和休息服务列表,我通过两个地址打开它。一种是使用本地主机,第二种是使用我电脑的 ip。所以我得到了这些输出。 使用本地主机
这是一个 AnyHashable 不支持枚举转换的简单案例。 enum testEnum: String { case Test } let myObject: AnyHashable = t
我的主要目标是比较存储在数据库和 XLSX 文件中的数据。 为此,我按以下方式创建了两个列表: private class ProductList { public string produc
我从 CMake 3.6 更新到任何最新版本 (3.12.0-rc2),现在我的一个程序无法编译。 奇怪的是,错误消息显示了标准库本身中的 undefined symbol 。这是错误消息: Unde
我希望将我的自定义对话框动画化为从特定点出现,但我无法为对话框设置动画。 该对话框是一个基本的 RelativeLayout,设置为 extends Dialog 类中的布局。 正如这里的一些答案所建
我已经在这个论坛上调查过很多类似的问题,但似乎没有一个能解决我的问题。 我会在底部列出我在这个论坛上看到的一些问题页面,但让我先谈谈我对这个问题的看法。 我正在使用 codeigniter v 2.x
我正在尝试在 RHEL 7 上启动一个 docker-compose 项目作为 systemd 服务。这是我的 systemd 脚本 (/etc/systemd/system/wp.service):
这个问题已经有答案了: "Notice: Undefined variable", "Notice: Undefined index", "Warning: Undefined array key",
我正在尝试在 RHEL 7 上启动一个 docker-compose 项目作为 systemd 服务。这是我的 systemd 脚本 (/etc/systemd/system/wp.service):
此问题出现在my last question here之后。我想将每个按钮聚焦和失去焦点背景设置为主菜单(ContentPane 即 JPanel)下方的背景颜色,因此按钮看起来像选项卡。它在不同的环
我是一名优秀的程序员,十分优秀!