- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
它应该是什么样子(Chrome)
I am creating a website for a school project and am currently up to browser testing. All the other browsers; Chrome, Firefox, Safari have had no problems. But, IE has gotten rid of the space for my fixed footer at the bottom of page. I have tried adding a margin-bottom to the main div but nothing happens. Does anyone know how to fix this?
这是我网站的代码CSS
/*** Mobile View Styling **/
@media screen and (min-width: 0px) {
/** Stops page from being so small it is unreadable **/
html, body {
min-width: 300px;
}
body{
margin: 0px;
}
/** Table for Enduro, DH, Jump and XC page **/
th,td {
border: 2px solid black;
font-family: 'Roboto', sans-serif;
}
table {
width: 60%;
margin: 0 auto;
}
/* Aligns text to the center below image on each page **/
.yeti {
text-align: center;
}
/** Fonts **/
p {
font-family: 'Roboto', sans-serif;
}
h1, nav, h2, h3 {
font-family: 'Roboto Condensed', sans-serif;
}
/** Image, caption and logo styling **/
figure {
margin-top: 0em;
margin-bottom: oem;
margin-left: 0px;
margin-right: 0px;
}
img {
width: 80vw;
display: block;
margin: 0 auto;
transition: All 0.7s ease;
-webkit-transition: All 0.7s ease;
}
figcaption {
font-family: 'Roboto', sans-serif;
text-align: center;
margin-top: 2px;
}
img.hover:hover {
border-radius: 33%;
filter: sepia(30%);
}
#logo {
width: 100%;
margin: 0 auto;
}
/** Nav styling **/
nav {
list-style-type: none;
width: 100%;
display: none;
position: static;
margin-top: 30px;
}
/** Active class added to current page, easier for user **/
.active {
background: black;
color: red;
}
/** Hamburger menu comes down when button is clicked **/
.hamburger{
background:none;
top:220px;
right: 35%;
text-align: center;
line-height:45px;
padding:5px 15px 0px 15px;
color:black;
border:0;
font-size:1.4em;
font-weight:bold;
cursor:pointer;
outline:none;
z-index:10000000000000;
}
nav.clicked {
display: block;
}
nav a {
text-decoration: none;
width: 80%;
font-size: 30px;
margin-top: 10px;
border: 2px solid black;
border-radius: 20px;
padding: 5px;
background: rgb(227,37,37);
color: black;
display: block;
text-align: center;
}
nav a:hover {
color: red;
background: black;
-webkit-transition: All 0.5s ease;
transition: All 0.5s ease;
}
/** Header, main content and footer **/
header {
background: rgba(150,150,150,1);
margin-bottom: 20px;
position: relative;
text-align: center;
align-items: center;
padding-bottom: 15px;
}
footer {
position: relative;
bottom: 0px;
background: rgb(150,150,150);
text-align: center;
width: 100%;
height: 50px;
margin-bottom: 0px;
padding-top: 5px;
}
div#main {
width: 90%;
margin: 0 auto;
display: block;
border: 2px solid black;
padding: 0px 5px 5px 5px;
background: rgb(227,37,37);
margin-bottom: 10px;
}
/** Video styling **/
.center {
width: 290px;
height: 225px;
margin: 0 auto;
display: block;
}
}
/** Tablet View **/
@media screen and (min-width: 480px) {
/** Hides the menu button **/
.hamburger {
display: none;
}
/** Header and Nav styling **/
#logo {
width: 30%;
display: inline;
position: relative;
max-height: 130px;
max-width: 405px;
}
nav {
top: -7px;
left: 27%;
position: fixed;
width: 90%;
margin: 0 auto;
list-style-type: none;
align-self: center;
display: inline;
}
nav a {
display: inline;
text-decoration: none;
margin-right: 2vw;
font-size: 1.6vw;
margin-top: 10px;
border: 2px solid black;
border-radius: 20px;
padding: 5px;
color: black;
width: 10%;
}
header {
background: rgba(150,150,150,1);
position: fixed;
width: 100%;
z-index: 100;
top: 0px;
text-align: left;
align-items: inherit;
}
header h1 {
text-align: center;
margin-top: -10px;
font-size: 5vw;
opacity: 1;
display: block;
height: auto;
}
div#main {
margin: 0 auto;
width: 80%;
background: white;
display: block;
border: 2px solid black;
position: relative;
margin-top: 220px;
z-index: 80;
margin-bottom: 20px;
padding: 0px 5px 5px 5px;
background: rgb(227,37,37);
}
/** Image and Video styling **/
img {
width: 80%;
}
.center {
width: 75%;
height: 56.25%;
margin: 0 auto;
display: block;
z-index: 1000000000000;
}
/** Footer **/
footer {
position: relative;
bottom: 0px;
background: rgb(150,150,150);
padding-top: 10px;
padding-bottom: 5px;
text-align: center;
width: 100%;
height: 50px;
margin-bottom: 0px;
}
/** Makes the header h1 disappear after scrolling a certain distance **/
.h1gone {
margin-top: -80px;
opacity: 1;
display: none;
margin-bottom: 30px;
transition: opacity 0s, display 0s;
}
/** Makes the header's background transparent after scrolling a certain distance **/
.scrolled {
background: rgba(150,150,150,0.8);
transition: background 2s;
}
}
/** Desktop View **/
@media screen and (min-width: 768px) {
/** Stops the header h1 from disappearing **/
.h1gone {
opacity: 1;
display: block;
margin-top: -20px;
}
/** Stops the background from overlapping with the already transparent background **/
.scrolled {
background: rgba(150,150,150,0);
}
/** Image and Video styling **/
img {
width: 50vw;
}
.center {
width: 90%;
}
/** Nav and header styling **/
nav {
position: relative;
left: 0px;
top: 20vw;
margin-left: 3.5%;
}
nav a {
font-size: 20px;
display: block;
width: 15vw;
}
header {
background: rgba(150,150,150,0);
margin-bottom: 20px;
position: relative;
text-align: center;
align-items: center;
margin-top: 0px;
height: 20vh;
}
header h1 {
text-align: center;
margin-top: -20px;
margin-bottom: 30px;
}
#mainhead {
background: rgba(150,150,150,0.8);
position: fixed;
width: 100%;
height: auto;
z-index: 1000000;
}
/** Main content and footer styling **/
div#main {
position: absolute;
width: 65%;
margin-left: 30%;
margin-top: 35px;
top: 20vw;
margin-bottom: 60px;
}
footer {
position: fixed;
bottom: 0px;
padding-bottom: 0px;
padding-top: 0px;
z-index: 10000;
background: rgba(150,150,150,0.8);
}
}
<html class="gr__computing_tbc_school_nz"><!-- Links stylesheet, fonts, scripts and sets the viewport --><head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=EDGE">
<link href="../styles/styles.css" rel="stylesheet" type="text/css">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="https://fonts.googleapis.com/css?family=Roboto|Roboto+Condensed" rel="stylesheet">
<script src="../scripts/overlay.js"></script>
<title>Crankworx Equiptment in Use - Kye</title>
</head>
<!-- Start of body -->
<body data-gr-c-s-loaded="true">
<!-- Header and Nav (Hamburger button aswell)-->
<header class="scrolled">
<div id="mainhead">
<img id="logo" src="../images/Crankworxlogo.png">
<h1 class="title h1gone">Types of Equiptment in Use at Crankworx</h1>
<button class="hamburger" onclick="changeClass()">Menu ☰</button>
</div>
<div class="menu">
<nav>
<!-- Nav, php added to determine current page -->
<ul class="nav">
<a class="" href="../webpages/index.php">Home</a>
<a class="active " href="../webpages/bikeTypes.php">Bike Types</a>
<a class="" href="../webpages/enduro.php">Enduro</a>
<a class="" href="../webpages/jump.php">Jump</a>
<a class="" href="../webpages/downhill.php">Downhill</a>
<a class="" href="../webpages/xc.php">Cross Country</a>
</ul>
</nav>
</div>
</header>
<div class="clearfix"></div>
<!-- Opening tag for main content -->
<div id="main"><!-- Start of main content -->
<h1>Different Types of Bikes in Use</h1>
<p>There were many different bikes being used at Crankworx Rotorua; Enduro, Jump/Slopestyle, Downhill and Cross Country.
The day we were there Jump/Slopestyle and Downhill bikes were being used.
</p>
<!-- Video of equiptment in use -->
<p>Here is a video of them in use;</p>
<div id="overlay" class="hidden"></div>
<video onmouseover="showOverlay();" onmouseout="hideOverlay();" class="center" width="640" height="420" controls="">
<source src="../video/equipinuse.mp4" type="video/mp4">
<source src="../video/equipinuse.ogg" type="video/ogg">
<source src="../video/equipinuse.webm" type="video/webm">
Sorry... Your browser does not support HTML5 video!
</video>
<!-- List of the different bikes at crankworx -->
<h2>Enduro Bike;</h2>
<figure>
<img class="hover" src="../images/Commencal Meta.jpg">
<figcaption>Image taken by myself</figcaption>
</figure>
<p> Enduro bikes are full suspension with reasonibly high travel forks and shocks.
The high-end bikes usually have carbon frames.The price for a mid range enduro bike is $3000-$5500.
The high-end bikes can cost more than $10,000. These were used at the Enduro World Series Giant Toa Enduro the weekend before.
</p>
<h2>Jump/Slopestyle Bikes;</h2>
<figure>
<img src="../images/JumpCommons.jpg" class="hover">
<figcaption>Image source: <a href="https://commons.wikimedia.org/wiki/File:Dirtbike_on_sylt.jpg">Link</a></figcaption>
</figure>
<p>Jump/Slopestyle Bikes are hardtail (only front suspension) bikes that are designed to move around easily in the air.
The handlebars are made to be spun 360 degrees for barspins. There are also crank stoppers to stop them from moving in the air.
This makes it easier for the rider to land back on the peddles after doing a trick.
Jump Bikes are probably the cheapest bike to buy as they require the minimum amount of parts. They can cost from $400 - $2000.
These were used in the Dual Speed and Style and the main even Slopestyle in memory of McGazza.
</p>
<h2>Downhill Bikes;</h2>
<figure>
<img src="../images/Yeti Downhill Bike.jpg" class="hover">
<figcaption>Image taken by myself</figcaption>
</figure>
<p>Downhill bikes are made especially for going downhill, what a surprise! They are made to tackle super rooty and bumpy parts of trail and also hit massive jumps. They are full suspension and usually have around 200mm of travel on the forks and rear shock.
They can pretty much roll over anything. Downhill bikes cost anything from $1800 to $9000. These were used in the Crankworx Rotorua Air DH.
</p>
<h2>Cross Country bikes;</h2>
<figure>
<img src="../images/XCCom.jpg" class="hover">
<figcaption>Image source: <a href="https://commons.wikimedia.org/wiki/File:Pinarello_Dogma_XC_Shimano_XTR_Custom_Bike_(16165258647).jpg">Link</a></figcaption>
</figure>
<p>Cross Country bikes are designed to go up and down hills, mainly to go fast up hills. They have one front fork with around 100mm of travel. An entry level XC bike costs around $1500 the high-end ones can cost $10000, these are usually full carbon. These were used in the National Schools XC champs.</p>
<!-- End of main content -->
<!-- Adds the footer and closing tags to page -->
</div>
<!-- Closing tag for main content -->
<footer>
<p>© Crankworx Rotorua website designed by Kye Oldham sites in 2017</p>
</footer>
<!-- Scripts for hamburger menu, transparent nav and disapearing h1 when scrolling -->
<!-- JQuery for hamburger button -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<script type="text/javascript">
function changeClass()
{
$('nav').toggleClass('clicked');
}
$(function() {
var header = $("header");
var h1 = $("h1.title");
$(window).scroll(function() {
var scroll = $(window).scrollTop();
if (scroll >= 200) {
header.addClass("scrolled");
h1.addClass("h1gone");
} else {
header.removeClass("scrolled");
h1.removeClass("h1gone");
}
});
});
</script>
<!-- End of whole webpage--></body></html>
提前致谢!
最佳答案
Used This: To Set Default Browser Margin Padding
body {
margin: 0 !important;
padding: 0 !important;
}
或
*
{ margin :0;填充:0;框大小:边框框;
如果您想要的东西 * 全局性低于:
示例:
html, body, body div, span, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, abbr, address, cite, code, del, dfn, em, img, ins, kbd, q, samp, small, strong, sub, sup, var, b, i, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, figure, footer, header, hgroup, menu, nav, section, time, mark, audio, video {
margin: 0;
padding: 0;
border: 0;
outline: 0;
font-size: 100%;
vertical-align: baseline;
background: transparent;
}
或
A GitHub repository of all W3C HTML spec and vendor default CSS stylesheets can be found here
示例,根据默认的 W3C HTML4 规范:
html, address,
blockquote,
body, dd, div,
dl, dt, fieldset, form,
frame, frameset,
h1, h2, h3, h4,
h5, h6, noframes,
ol, p, ul, center,
dir, hr, menu, pre { display: block; unicode-bidi: embed }
li { display: list-item }
head { display: none }
table { display: table }
tr { display: table-row }
thead { display: table-header-group }
tbody { display: table-row-group }
tfoot { display: table-footer-group }
col { display: table-column }
colgroup { display: table-column-group }
td, th { display: table-cell }
caption { display: table-caption }
th { font-weight: bolder; text-align: center }
caption { text-align: center }
body { margin: 8px }
h1 { font-size: 2em; margin: .67em 0 }
h2 { font-size: 1.5em; margin: .75em 0 }
h3 { font-size: 1.17em; margin: .83em 0 }
h4, p,
blockquote, ul,
fieldset, form,
ol, dl, dir,
menu { margin: 1.12em 0 }
h5 { font-size: .83em; margin: 1.5em 0 }
h6 { font-size: .75em; margin: 1.67em 0 }
h1, h2, h3, h4,
h5, h6, b,
strong { font-weight: bolder }
blockquote { margin-left: 40px; margin-right: 40px }
i, cite, em,
var, address { font-style: italic }
pre, tt, code,
kbd, samp { font-family: monospace }
pre { white-space: pre }
button, textarea,
input, select { display: inline-block }
big { font-size: 1.17em }
small, sub, sup { font-size: .83em }
sub { vertical-align: sub }
sup { vertical-align: super }
table { border-spacing: 2px; }
thead, tbody,
tfoot { vertical-align: middle }
td, th, tr { vertical-align: inherit }
s, strike, del { text-decoration: line-through }
hr { border: 1px inset }
ol, ul, dir,
menu, dd { margin-left: 40px }
ol { list-style-type: decimal }
ol ul, ul ol,
ul ul, ol ol { margin-top: 0; margin-bottom: 0 }
u, ins { text-decoration: underline }
br:before { content: "\A"; white-space: pre-line }
center { text-align: center }
:link, :visited { text-decoration: underline }
:focus { outline: thin dotted invert }
/* Begin bidirectionality settings (do not change) */
BDO[DIR="ltr"] { direction: ltr; unicode-bidi: bidi-override }
BDO[DIR="rtl"] { direction: rtl; unicode-bidi: bidi-override }
*[DIR="ltr"] { direction: ltr; unicode-bidi: embed }
*[DIR="rtl"] { direction: rtl; unicode-bidi: embed }
@media print {
h1 { page-break-before: always }
h1, h2, h3,
h4, h5, h6 { page-break-after: avoid }
ul, ol, dl { page-break-before: avoid }
}
关于html - Microsoft Edge 和 IE 去掉了页面底部固定页脚的空间,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44083852/
我正在尝试将 Outlook API 与我的 React 应用程序集成。当我尝试使用 microsoft-graph-client 实现身份验证时,遇到以下错误。 'ImplicitMSALAuthe
我正在尝试使用 Microsoft Graph Beta API 在 Microsoft Teams 中创建 channel 。在文档中,它说 channel 实体具有属性 IsFavoriteByD
我的目标很简单。我想使用图形 API 将自动聊天消息发送到 MS Teams channel 。 这似乎是图形 API 的测试版功能,仅在 Microsoft.Graph.Beta 中可用。 我已经阅
通过委派权限获取 Teams channel 消息时(用户是团队成员): https://graph.microsoft.com/beta/teams/ {team_id}/channels/{cha
我正在使用带有 OData 端点的 Web API 和 Entity Framework 创建一个 RESTful 服务。 Microsoft.AspNet.WebApi.OData 和 Micros
我可以通过对标题和作者姓名的评估查询(以及解释查询)获得良好的结果。 但是如果我想通过 DOI 查找论文怎么办? 我可以通过扩展元数据描述(在现有搜索的属性中)获取条目的DOI信息,但是由于扩展元数据
我正在尝试通过displayName查询用户,但是在同时使用C#SDK和Graph Explorer发送请求时,我无法转义单引号。 更新:在示例中不清楚,我遇到麻烦的搜索词是I' 查询示例: http
我在使用 Microsoft fakes 的解决方案中有一个单元测试项目,当我构建它时出现以下错误。它提示无法加载的 DLL 在磁盘上。我已经打开了 Fusion 日志记录,这表明绑定(bind)成功
我想创建一个应用程序,当用户在 MS Teams 中接到电话时会收到通知。我的意思是我想在来电事件上订阅一些东西,然后根据来电信息做一些事情。这可能吗?到目前为止,我在 SDK 中没有看到任何事件。
如果我开发一个网站,它是否会以相同的方式在 IE11、Chrome、Firefox 和 edge 上运行,还是我们需要专门为 IE11 编写代码?我没有 Windows 8,因此无法在边缘浏览器上测试
我几个月前为某些收件箱创建了一些订阅,系统成功收到了有关收到电子邮件的通知,订阅也定期更新以增加到期日期。这是我的订阅列表: https://graph.microsoft.com/v1.0/subs
如果我开发一个网站,它是否会以相同的方式在 IE11、Chrome、Firefox 和 edge 上运行,还是我们需要专门为 IE11 编写代码?我没有 Windows 8,因此无法在边缘浏览器上测试
如果 Edge 在某些机器上发生崩溃,我们需要检查日志以了解发生了什么情况。 最佳答案 Microsoft Edge 实际上是一个 Windows 进程,因此您应该能够在事件查看器中查看日志。此外,您
我已经将一些测试用例与项目中的单元测试相关联。该项目已构建并复制到共享上的放置位置。当我去运行这些测试时,由于作为这些测试的一部分包含的非托管 DLL 的 System.DllNotFoundExce
我对 asp.net 核心标识中的三个包感到困惑。我不知道彼此之间有什么区别。还有哪些是我们应该使用的? 我在 GitHub 上找到了这个链接,但我没有找到。 Difference between M
在我的 Windows 类库(由 MVC 网站使用)中,我安装了 NugetPackage Microsoft.SqlServer.Types (Spatial)。 现在,我正在使用 ado.net
我有一个简单的 web 应用程序,我在 Teams 中显示为一个应用程序。我已经在 App Studio 中进行了设置,一切都按我的预期工作,一切都很好。它正在显示我的网络应用程序,这就是我想要的。
有什么不同?它们都是业务管理解决方案。他们做的一样吗?一些不同的版本?他们使用同一个平台吗? 动态 Assets 净值 Microsoft Dynamics NAV 2009 is a compreh
如何制定包含非英语字符(例如日耳曼语Umlauts)的Microsoft Graph /myOrganization/users OData查询? 例子: 我的租户中有一个名为“ThomasMülle
我想创建一个类似于乐队附带的星巴克应用程序的应用程序。我想显示条形码。我可以在云端或本地设备上将条形码生成为 JPG 图像,但我需要能够在乐队的屏幕上显示它们。到目前为止,我还没有找到使用 Band
我是一名优秀的程序员,十分优秀!