- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
所以我有点问题.. 即使它们位于媒体查询代码所在的 CSS 文件中,我的媒体查询也不会响应我的样式。我缩小了范围,发现我的“背景:透明;”在我的媒体查询中不起作用。如果我能正常工作,我的背景图像应该按照我想要的方式工作。
这是我想要的布局,目前我的背景没有响应,所以现在它只是一个大的红色背景,用白色文本覆盖我的图片,这就是它在响应时应该的样子。代码如下。
HTML:
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" type="text/css" href="pwccss.css">
<meta name="viewport" id="pwcviewport" content="width=device-width, initial-scale=1.0">
</head>
<body class="pwcscrolling longformcontent longform-level2-landing-template page-primary-col--red page-
secondary-col--burgundy page-tertiary-col--maroon">
<div id="wrapper">
<div class="centerPar">
<section id="title" class="clearfix no-background__mobile page-section page section--col-primary page-section--col-dark nomove fullwidth videobghost" data-image:"https://www.pwc.se/content/dam/pwc/se/sv/hero/hero-finansdagen-1920x1080-16_9.jpg" data-wcmmode"false" data-parallax:"false" style="background-image: url(https://www.pwc.se/content/dam/pwc/se/sv/hero/hero-finansdagen-1920x1080-16_9.jpg); background-position: center center; background-repeat: no-repeat; background-size: cover; margin-top: 2%;">
<div class="parsys sectionpar">
<div class="herotitle section">
<div class="dpe-component-wrapper hero-title-component hero-title-component--colour-h1">
<div class="hero-title">
<div class="container">
<div class="row">
<div class="textColumn col-sm-6">
<div class="hero-title-textpanel">
<h1>Finansdagen</h1>
<p class="sub-heading">Finansdagen - ett event där PwC samlar intressanta talare kring ett ämne som är aktuellt i tiden för all som arbetar inom den finansiella sektorn.</p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
<section id="två">
<div class="text-border">
<div class="Youtube">
<iframe id="videoelement4107d561-1255-4d1c-ac40-0cac0106bf82_youtube" style="display: block;" frameborder="0" allowfullscreen="1" gesture="media" title="YouTube video player" width="100%" height="100%" src="https://www.youtube.com/embed/1YsOkJcAqmQ?html5=1&autoplay=0&controls=0&showinfo=0&rel=0&modestbranding=0&playsinline=1&origin=https%3A%2F%2Fwww.pwc.se&enablejsapi=1&widgetid=1" class=" jw-stretch-exactfit"></iframe>
</div>
<div class="text">
<h2 style="font-size: 2.2rem; line-height: 1.3em; margin: 0px 0px 20px; font-style:italic; font-family: georgia,serif">
Se filmen från finansdagen</h2>
<p style="line-height: 1.5em; margin: 0px 0 10px; letter-spacing: .004em; font-size: 1.142rem;">
Anna Wikland, Sverigechef på Google, blev tidigare i år utsedd till Sveriges mäktigaste
kvinna inom tech. Så här ser hon på framtiden:
</p>
</div>
</div>
</section>
</div>
</div>
</body>
</html>
css:
/* styling på bodyn */
html, body{
height: 100%;
}
body{
width: 100%;
height: auto;
margin:0 auto;
color: rgb(64, 64, 65);
line-height: 1;
}
.centerPar {
padding-top: 125px;
min-height: 100%;
}
h1, .h1 {
font-size: 2.714rem;
font-weight: bold;
line-height: 1.3em;
margin: 20px 0 10px;
letter-spacing: .002em;
}
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
font-family: georgia,serif;
font-style: italic;
font-weight: normal;
color: inherit;
}
*, *:before, *:after {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
*, *:before, *:after {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
* {
padding: 0;
margin: 0;
box-sizing: border-box;
}
* {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
div {
display: block;
}
/* body slut */
/* wrapper runt sektionerna */
#wrapper{
margin-left: auto;
margin-right: auto;
background: #fff;
position: relative;
max-width: 100%;
padding: 0 !important;
min-width: 320px;
}
#wrapper section:before,
#wrapper section:after {
content: " ";
display: table;
}
/* wrapper slut */
/* sektion ett */
.page-primary-col--red .page-section.page-section--col-primary {
background: #e0301e;
}
.page-section.page-section--col-primary {
background: #e0301e;
}
@media (max-width: 767px)
.no-background__mobile {
background-image: none !important;
}
section, .page-section {
height: auto;
margin: 0 auto;
width: 100%;
position: relative;
}
.clearfix, .clearfix:before, .clearfix:after, .container:before,
.container:after, .container-fluid:before, .container-fluid:after,
.row:before, .row:after {
content: " ";
display: table;
}
section {
table-layout: fixed;
}
section.fullwidth .parsys.sectionpar {
width: 100%;
padding: 0;
}
.pwcscrolling .sectionpar, .pwcscrolling #footer-wrapper {
padding: 0 15px;
}
.sectionpar, #footer-wrapper {
margin: 0 auto;
}
@media (max-width: 768px)
.page-primary-col--red .hero-title{
background: #e0301e;
}
.hero-title {
background: #e0301e;
color: #fff;
position: relative;
overflow: hidden;
}
.container{
padding-left: 15px;
padding-right: 15px;
margin-right: auto;
margin-left: auto;
}
.container h1:first-of-type,
.container h2:first-of-type,
.container h3:first-of-type {
margin-top: 0;
}
@media (max-width: 600px)
.container {
padding-left: 15px;
padding-right: 15px;
}
@media (min-width: 768px)
.col-sm-6 {
width: 50%;
}
@media (min-width: 768px)
.col,
.col-sm-1, .col-sm-2,
.col-sm-3, .col-sm-4,
.col-sm-5, .col-sm-6,
.col-sm-7, .col-sm-8,
.col-sm-9, .col-sm-10,
.col-sm-11, .col-sm-12 {
float: left;
}
@media (min-width: 768px)
.container {
width: 750px;
}
@media (min-width: 768px)
body .hero-title-component .hero-title {
background: transparent;
min-height: 35.715rem;
}
@media (min-width: 768px)
.hero-title-textpanel {
background: #fff;
color: #000;
margin: 40px 0;
padding: 40px 40px 20px;
}
@media (min-width: 992px)
.sectionpar {
width: 970px;
}
@media (min-width: 768px)
.page-primary-col--red .hero-title-component--colour-h1 .hero-title-textpanel h1 {
color: #e0301e;
}
@media (min-width: 768px)
.hero-title-textpanel p {
color: #404041;
}
.row{
margin-left: -15px;
margin-right: -15px;
}
.hero-title-textpanel {
background: inherit;
margin: 20px 0;
padding: 0;
}
.hero-title-textpanel h1 {
color: #fff;
margin: 0 0 10px;
font-weight: bold;
}
.sub-heading {
font-size: 1.714rem;
line-height: 1.5em;
margin: 10px 0 10px;
}
.serif, .sub-heading, .lead {
font-family: georgia,serif;
font-style: italic;
font-weight: normal;
}
element.style{
background-image: url(https://www.pwc.se/content/dam/pwc/se/sv/hero/hero-finansdagen-1920x1080-16_9.jpg);
background-size: cover;
background-repeat: no-repeat;
background-position: center center;
}
article, aside, details, figcaption, figure, footer, header, hgroup, main, menu, nav, section, summary {
display: block;
}
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,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,section,summary,time,mark,audio,video,{
margin:0;
padding:0;
border:0;
vertical-align: baseline;
}
.btn-group-vertical>.btn-group:after, .btn-group-vertical>.btn-group:before, .btn-toolbar:after, .btn-toolbar:before,
.clearfix:after, .clearfix:before,
.container-fluid:after, .container-fluid:before, .container:after, .container:before,
.dl-horizontal dd:after, .dl-horizontal dd:before,
.form-horizontal .form-group:after, .form-horizontal .form-group:before,
.modal-footer:after, .modal-footer:before,
.nav:after, .nav:before,
.navbar-collapse:after, .navbar-collapse:before, .navbar-header:after, .navbar-header:before, .navbar:after, .navbar:before,
.pager:after, .pager:before, .panel-body:after, .panel-body:before, .row:after, .row:before {
display: table;
content: " ";
}
.col, .col-xs-1, .col-sm-1, .col-md-1, .col-lg-1,
.col-xs-2, .col-sm-2, .col-md-2, .col-lg-2,
.col-xs-3, .col-sm-3, .col-md-3, .col-lg-3,
.col-xs-4, .col-sm-4, .col-md-4, .col-lg-4,
.col-xs-5, .col-sm-5, .col-md-5, .col-lg-5,
.col-xs-6, .col-sm-6, .col-md-6, .col-lg-6,
.col-xs-7, .col-sm-7, .col-md-7, .col-lg-7,
.col-xs-8, .col-sm-8, .col-md-8, .col-lg-8,
.col-xs-9, .col-sm-9, .col-md-9, .col-lg-9,
.col-xs-10, .col-sm-10, .col-md-10, .col-lg-10,
.col-xs-11, .col-sm-11, .col-md-11, .col-lg-11,
.col-xs-12, .col-sm-12, .col-md-12, .col-lg-12 {
position: relative;
min-height: 1px;
padding-left: 15px;
padding-right: 15px;
}
section {
table-layout: fixed;
}
/* sektion ett slut */
#två{
background-color:#f2f2f2;
margin-top: 2%;
width: 100%;
}
.text{
float: left;
}
.text-border {
width: 28%;
margin-left: 11%;
}
最佳答案
您的媒体查询格式不正确,缺少大括号。
你有什么
@media (max-width: 767px) /* styling */
你需要什么
@media (max-width: 767px) { /* styling */ }
关于html - 媒体查询没有响应我的样式?在 CSS 文件中导入错误?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47415808/
我喜欢调整 目录的样式(例如背景颜色、字体)预订 , Gitbook 风格 HTML 文档。 这可能吗?如果是这样,有人可以善意地指出我可以开始这样做的地方吗? 谢谢你。 最佳答案 两个步骤: 1)
是否可以使用纯 CSS 选择器根据子节点的兄弟节点数量为节点子节点(在我的例子中为 UL)提供不同的属性,特别是高度? 例如,如果一个节点有 1 个子节点,则 UL 的高度是自动的,但是如果该节点有
我正在与 Vala 一起工作,它首先编译为 C,然后正常从 C 编译。 valac 的一项功能(Vala 编译器)是为 .vala 生成“fast-vapi”文件。 fast-vapi 本质上是为 .
我有两个具有 .body 类的 div,但是,一个位于另一个具有 .box 类的 div 中 - 如下所示: 我只想为 .box 内部的 .body 设置样式...但我在下面所
**注意所有 <> 标签已被删除以允许代码显示**我已经玩了好几个小时了,如果不在设计结束时使用解决方法(即 Corel 绘图),我就无法真正让它工作 *在我继续之前, 首先,网站 URL 是 Adv
我从一个服务中接收到一个字符串,该字符串显然使用 UTF-32 编码对其 unicode 字符进行编码,例如:\U0001B000(C 风格的 unicode 编码)。但是,为了在 JSON 中序列化
我在应用程序资源中有一种样式,我想将其应用于许多不同的饼图。样式如下所示: 为了简单起见,我排除了更多的属性。这一切都很好。现在,我的一些馅饼需要有一个不同的“模型
想象一下,我有一个名为“MyCheckBoxStyle”的 CheckBox 自定义样式。 如何制作基于 MyCheckBoxStyle 嵌入自定义 DataGridCheckBoxColumn 样式
我有一个 Button我在 WPF 中开发的样式,如 this question 中所述.我想用这种风格做的另一件事是拥有 Button缩小一点点,使其看起来像被点击一样被点击。现在,转换代码如下所示
我为超链接控件创建了一个样式:
不知道为什么,但我的 typeahead.js 远程自动完成停止工作。我没有更改任何关于 typeahead.js 的代码,但既然它坏了,我一定是错的。你能看看我的site here吗? ?我会创建
有没有办法创建扩展当前样式的样式,即不是特定样式? 我有一个 WPF 应用程序,我在其中创建样式来设置一些属性,例如边框或验证。 现在我想尝试一些主题,看看哪
我正在为一个网站提出问题,并希望 var reltext 中的正确/再试消息具有不同的颜色,即绿色表示正确,红色表示错误,并且每个旁边可能有一个小 png。 有什么想法吗? A local co
我想到达列表的父节点(使用 id 选择器)并使用纯 JavaScript 添加背景颜色来设置其样式。这是我的代码,但不起作用。 var listParentNode; listPare
关闭。此题需要details or clarity 。目前不接受答案。 想要改进这个问题吗?通过 editing this post 添加详细信息并澄清问题. 已关闭 4 年前。 Improve th
过去几天我一直在与这段代码作斗争,我真的不知道该如何处理它。 基本上,当用户将鼠标滚动到主导航菜单中的某个 LI 元素上时,就会运行一个 Javascript 函数,并根据触发该函数的元素将链接放入下
使用这个可爱的 html 和 css 作为指南,我能够在我的照片上显示我的姓名首字母。 这很好,但是,如果图像不存在,我只想显示首字母;如果图像存在,则不应渲染 peron 首字母。 换句话说,当该图
使用这个可爱的 html 和 css 作为指南,我能够在我的照片上显示我的姓名首字母。 这很好,但是,如果图像不存在,我只想显示首字母;如果图像存在,则不应渲染 peron 首字母。 换句话说,当该图
是否有人尝试过将 JButton 设计为看起来像 NetBeans 工具栏按钮?这将只显示一张图片,当您将鼠标悬停在它上面时,会显示 1px 圆形角灰色边框,并且按钮顶部和底部的背景不同......似
在 Ax2012 中使用图表,它们工作正常。但我想更改它在启动时显示的图表类型,例如“样条”图表,而不是默认的“柱状图”图表。 这是我现在拥有的: http://i.stack.imgur.com/R
我是一名优秀的程序员,十分优秀!