- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我目前正在设置一些使用 flexbox 的图 block ,它们将占据最高图 block 的整个高度。
我在 tiles 的容器上使用以下代码:
{
display: -webkit-box;
display: -moz-box;
display: -ms-flexbox;
display: -webkit-flex;
display: flex;
}
我已经在最新版本的 Safari、Chrome 和 FF 中尝试了我的实现,一切都按预期工作。然而,当我在 safari 8 中尝试时,瓷砖并没有占据最高瓷砖的整个高度。
我检查了http://caniuse.com/在 Safari 8 中应该支持带有前缀的 flexbox。
最佳答案
当你在底部使用绝对定位元素时,你的 promotion__box
需要考虑它的空间,这里用额外的填充来完成
.promotion__box {
color: #666;
font-size: 1.3333333333em;
margin-top: -2%;
padding: 10px 0 80px 20px; /* added 80px to bottom */
margin: 0 auto;
width: 250px;
}
示例片段
.row-type14 {
display: -webkit-box;
display: -moz-box;
display: -ms-flexbox;
display: -webkit-flex;
display: flex;
}
.row-type14__slot1,
.row-type14__slot2,
.row-type14__slot3,
.row-type14__slot4 {
box-sizing: border-box;
margin-right: 2.1276595745%;
width: 23.4042553191%;
position: relative;
}
.widget__promotion {
box-sizing: border-box;
margin-right: 2.1276595745%;
width: 100%;
margin-right: 0;
height: 100%;
background: #e4e4e4;
}
.promotion__image {
height: auto;
width: 100%;
}
.promotion__box {
color: #666;
font-size: 1.3333333333em;
margin-top: -2%;
padding: 10px 0 80px 20px;
margin: 0 auto;
width: 250px;
}
.promotion__links {
bottom: 2.49rem;
left: 0;
position: absolute;
right: 0;
margin: 0 auto;
text-align: center;
}
<ol class="row-type14">
<li class="row-type14__slot1 js-row-item">
<article class="widget__promotion" data-layer-promotion-view="{"row_type":"14 tall ones","row_id":"home-page-row-08-widget","column_id":1,"id":"slh-home-promotion-widget-1","name":"Selected promotion widget","creative":"/on/demandware.static/-/Library-Sites-bestseller-content-library/default/dw27cfa007/images/homepage/customer-service.jpg"}">
<a data-layer-click="{"event":"promotionClick","ecommerce":{"promoClick":{"promotions":[{"row_type":"14 tall ones","row_id":"home-page-row-08-widget","column_id":1,"id":"slh-home-promotion-widget-1","name":"Selected promotion widget","creative":"/on/demandware.static/-/Library-Sites-bestseller-content-library/default/dw27cfa007/images/homepage/customer-service.jpg"}]}}}" href="/on/demandware.store/Sites-BSE-Nordic-Site/no_NO/Page-Show?cid=help-link" target="_self">
<img src="http://sits-pod39.demandware.net/dw/image/v2/ABBT_S25/on/demandware.static/-/Library-Sites-bestseller-content-library/default/dw27cfa007/images/homepage/customer-service.jpg?sw=660" srcset="http://sits-pod39.demandware.net/dw/image/v2/ABBT_S25/on/demandware.static/-/Library-Sites-bestseller-content-library/default/dw27cfa007/images/homepage/customer-service.jpg?sw=660 660w,http://sits-pod39.demandware.net/dw/image/v2/ABBT_S25/on/demandware.static/-/Library-Sites-bestseller-content-library/default/dw27cfa007/images/homepage/customer-service.jpg?sw=870 870w,http://sits-pod39.demandware.net/dw/image/v2/ABBT_S25/on/demandware.static/-/Library-Sites-bestseller-content-library/default/dw27cfa007/images/homepage/customer-service.jpg?sw=1280 1280w" data-size="hero" alt="Selected Image" class="promotion__image" sizes="100vw">
</a>
<div class="promotion__box promotion__box-graphic">
<h3 class="promotion__box-title">Selected Promotion</h3>
<span class="promotion__box-subtitle">#selectedhomme</span>
</div>
<div class="promotion__links">
<a class="promotion__call-to-action" data-layer-click="{"event":"promotionClick","ecommerce":{"promoClick":{"promotions":[{"row_type":"14 tall ones","row_id":"home-page-row-08-widget","column_id":1,"id":"slh-home-promotion-widget-1","name":"Selected promotion widget","creative":"/on/demandware.static/-/Library-Sites-bestseller-content-library/default/dw27cfa007/images/homepage/customer-service.jpg"}]}}}" href="/on/demandware.store/Sites-BSE-Nordic-Site/no_NO/Page-Show?cid=help-link" target="_self">
Read more
</a>
<a class="promotion__call-to-action" data-layer-click="{"event":"promotionClick","ecommerce":{"promoClick":{"promotions":[{"row_type":"14 tall ones","row_id":"home-page-row-08-widget","column_id":1,"id":"slh-home-promotion-widget-1","name":"Selected promotion widget","creative":"/on/demandware.static/-/Library-Sites-bestseller-content-library/default/dw27cfa007/images/homepage/customer-service.jpg"}]}}}" href="/on/demandware.store/Sites-BSE-Nordic-Site/no_NO/Page-Show?cid=help-link" target="_self">
Shop now
</a>
</div>
</article>
</li>
<li class="row-type14__slot2 js-row-item">
<article class="widget__promotion" data-layer-promotion-view="{"row_type":"14 tall ones","row_id":"home-page-row-08-widget","column_id":2,"id":"slh-home-promotion-widget-2","name":"Selected promotion widget","creative":"/on/demandware.static/-/Library-Sites-bestseller-content-library/default/dw27cfa007/images/homepage/customer-service.jpg"}">
<a data-layer-click="{"event":"promotionClick","ecommerce":{"promoClick":{"promotions":[{"row_type":"14 tall ones","row_id":"home-page-row-08-widget","column_id":2,"id":"slh-home-promotion-widget-2","name":"Selected promotion widget","creative":"/on/demandware.static/-/Library-Sites-bestseller-content-library/default/dw27cfa007/images/homepage/customer-service.jpg"}]}}}" href="/on/demandware.store/Sites-BSE-Nordic-Site/no_NO/Page-Show?cid=help-link" target="_self">
<img src="http://sits-pod39.demandware.net/dw/image/v2/ABBT_S25/on/demandware.static/-/Library-Sites-bestseller-content-library/default/dw27cfa007/images/homepage/customer-service.jpg?sw=660" srcset="http://sits-pod39.demandware.net/dw/image/v2/ABBT_S25/on/demandware.static/-/Library-Sites-bestseller-content-library/default/dw27cfa007/images/homepage/customer-service.jpg?sw=660 660w,http://sits-pod39.demandware.net/dw/image/v2/ABBT_S25/on/demandware.static/-/Library-Sites-bestseller-content-library/default/dw27cfa007/images/homepage/customer-service.jpg?sw=870 870w,http://sits-pod39.demandware.net/dw/image/v2/ABBT_S25/on/demandware.static/-/Library-Sites-bestseller-content-library/default/dw27cfa007/images/homepage/customer-service.jpg?sw=1280 1280w" data-size="hero" alt="Selected Image" class="promotion__image" sizes="100vw">
</a>
<div class="promotion__box promotion__box-graphic">
<h3 class="promotion__box-title">Selected Promotion</h3>
<span class="promotion__box-subtitle">#selectedhomme some other text text text more text more text more text more text more text more text more text more text more text more text more text more text more text more text more text more text more text more text more text</span>
</div>
<div class="promotion__links">
<a class="promotion__call-to-action" data-layer-click="{"event":"promotionClick","ecommerce":{"promoClick":{"promotions":[{"row_type":"14 tall ones","row_id":"home-page-row-08-widget","column_id":2,"id":"slh-home-promotion-widget-2","name":"Selected promotion widget","creative":"/on/demandware.static/-/Library-Sites-bestseller-content-library/default/dw27cfa007/images/homepage/customer-service.jpg"}]}}}" href="/on/demandware.store/Sites-BSE-Nordic-Site/no_NO/Page-Show?cid=help-link" target="_self">
Read more
</a>
<a class="promotion__call-to-action" data-layer-click="{"event":"promotionClick","ecommerce":{"promoClick":{"promotions":[{"row_type":"14 tall ones","row_id":"home-page-row-08-widget","column_id":2,"id":"slh-home-promotion-widget-2","name":"Selected promotion widget","creative":"/on/demandware.static/-/Library-Sites-bestseller-content-library/default/dw27cfa007/images/homepage/customer-service.jpg"}]}}}" href="/on/demandware.store/Sites-BSE-Nordic-Site/no_NO/Page-Show?cid=help-link" target="_self">
Shop now
</a>
</div>
</article>
</li>
<li class="row-type14__slot3 js-row-item">
<article class="widget__promotion" data-layer-promotion-view="{"row_type":"14 tall ones","row_id":"home-page-row-08-widget","column_id":3,"id":"slh-home-promotion-widget-3","name":"Selected promotion widget","creative":"/on/demandware.static/-/Library-Sites-bestseller-content-library/default/dw27cfa007/images/homepage/customer-service.jpg"}">
<a data-layer-click="{"event":"promotionClick","ecommerce":{"promoClick":{"promotions":[{"row_type":"14 tall ones","row_id":"home-page-row-08-widget","column_id":3,"id":"slh-home-promotion-widget-3","name":"Selected promotion widget","creative":"/on/demandware.static/-/Library-Sites-bestseller-content-library/default/dw27cfa007/images/homepage/customer-service.jpg"}]}}}" href="/on/demandware.store/Sites-BSE-Nordic-Site/no_NO/Page-Show?cid=help-link" target="_self">
<img src="http://sits-pod39.demandware.net/dw/image/v2/ABBT_S25/on/demandware.static/-/Library-Sites-bestseller-content-library/default/dw27cfa007/images/homepage/customer-service.jpg?sw=660" srcset="http://sits-pod39.demandware.net/dw/image/v2/ABBT_S25/on/demandware.static/-/Library-Sites-bestseller-content-library/default/dw27cfa007/images/homepage/customer-service.jpg?sw=660 660w,http://sits-pod39.demandware.net/dw/image/v2/ABBT_S25/on/demandware.static/-/Library-Sites-bestseller-content-library/default/dw27cfa007/images/homepage/customer-service.jpg?sw=870 870w,http://sits-pod39.demandware.net/dw/image/v2/ABBT_S25/on/demandware.static/-/Library-Sites-bestseller-content-library/default/dw27cfa007/images/homepage/customer-service.jpg?sw=1280 1280w" data-size="hero" alt="Selected Image" class="promotion__image" sizes="100vw">
</a>
<div class="promotion__box promotion__box-graphic">
<h3 class="promotion__box-title">Selected Promotion</h3>
<span class="promotion__box-subtitle">#selectedhomme</span>
</div>
<div class="promotion__links">
<a class="promotion__call-to-action" data-layer-click="{"event":"promotionClick","ecommerce":{"promoClick":{"promotions":[{"row_type":"14 tall ones","row_id":"home-page-row-08-widget","column_id":3,"id":"slh-home-promotion-widget-3","name":"Selected promotion widget","creative":"/on/demandware.static/-/Library-Sites-bestseller-content-library/default/dw27cfa007/images/homepage/customer-service.jpg"}]}}}" href="/on/demandware.store/Sites-BSE-Nordic-Site/no_NO/Page-Show?cid=help-link" target="_self">
Read more
</a>
<a class="promotion__call-to-action" data-layer-click="{"event":"promotionClick","ecommerce":{"promoClick":{"promotions":[{"row_type":"14 tall ones","row_id":"home-page-row-08-widget","column_id":3,"id":"slh-home-promotion-widget-3","name":"Selected promotion widget","creative":"/on/demandware.static/-/Library-Sites-bestseller-content-library/default/dw27cfa007/images/homepage/customer-service.jpg"}]}}}" href="/on/demandware.store/Sites-BSE-Nordic-Site/no_NO/Page-Show?cid=help-link" target="_self">
Shop now
</a>
</div>
</article>
</li>
<li class="row-type14__slot4 js-row-item">
<article class="widget__promotion" data-layer-promotion-view="{"row_type":"14 tall ones","row_id":"home-page-row-08-widget","column_id":4,"id":"slh-home-promotion-widget-4","name":"Selected promotion widget","creative":"/on/demandware.static/-/Library-Sites-bestseller-content-library/default/dw27cfa007/images/homepage/customer-service.jpg"}">
<a data-layer-click="{"event":"promotionClick","ecommerce":{"promoClick":{"promotions":[{"row_type":"14 tall ones","row_id":"home-page-row-08-widget","column_id":4,"id":"slh-home-promotion-widget-4","name":"Selected promotion widget","creative":"/on/demandware.static/-/Library-Sites-bestseller-content-library/default/dw27cfa007/images/homepage/customer-service.jpg"}]}}}" href="/on/demandware.store/Sites-BSE-Nordic-Site/no_NO/Page-Show?cid=help-link" target="_self">
<img src="http://sits-pod39.demandware.net/dw/image/v2/ABBT_S25/on/demandware.static/-/Library-Sites-bestseller-content-library/default/dw27cfa007/images/homepage/customer-service.jpg?sw=660" srcset="http://sits-pod39.demandware.net/dw/image/v2/ABBT_S25/on/demandware.static/-/Library-Sites-bestseller-content-library/default/dw27cfa007/images/homepage/customer-service.jpg?sw=660 660w,http://sits-pod39.demandware.net/dw/image/v2/ABBT_S25/on/demandware.static/-/Library-Sites-bestseller-content-library/default/dw27cfa007/images/homepage/customer-service.jpg?sw=870 870w,http://sits-pod39.demandware.net/dw/image/v2/ABBT_S25/on/demandware.static/-/Library-Sites-bestseller-content-library/default/dw27cfa007/images/homepage/customer-service.jpg?sw=1280 1280w" data-size="hero" alt="Selected Image" class="promotion__image" sizes="100vw">
</a>
<div class="promotion__box promotion__box-graphic">
<h3 class="promotion__box-title">Selected Promotion</h3>
<span class="promotion__box-subtitle">#selectedhomme something more ! dasdsadas dasdsad dasdas dsadsads dsadsadsadas</span>
</div>
<div class="promotion__links">
<a class="promotion__call-to-action" data-layer-click="{"event":"promotionClick","ecommerce":{"promoClick":{"promotions":[{"row_type":"14 tall ones","row_id":"home-page-row-08-widget","column_id":4,"id":"slh-home-promotion-widget-4","name":"Selected promotion widget","creative":"/on/demandware.static/-/Library-Sites-bestseller-content-library/default/dw27cfa007/images/homepage/customer-service.jpg"}]}}}" href="/on/demandware.store/Sites-BSE-Nordic-Site/no_NO/Page-Show?cid=help-link" target="_self">
Read more
</a>
<a class="promotion__call-to-action" data-layer-click="{"event":"promotionClick","ecommerce":{"promoClick":{"promotions":[{"row_type":"14 tall ones","row_id":"home-page-row-08-widget","column_id":4,"id":"slh-home-promotion-widget-4","name":"Selected promotion widget","creative":"/on/demandware.static/-/Library-Sites-bestseller-content-library/default/dw27cfa007/images/homepage/customer-service.jpg"}]}}}" href="/on/demandware.store/Sites-BSE-Nordic-Site/no_NO/Page-Show?cid=help-link" target="_self">
Shop now
</a>
</div>
</article>
</li>
</ol>
关于css - Safari 8 中的 Flexbox 布局中断,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41362782/
Safari 和 Mobile Safari 在组合边框半径、填充和边框时似乎有问题。在 Chrome 和 Firefox 中运行良好。 CSS: img { width: 200px;
每次我在打开 Safari 开发工具的情况下加载页面(无论是哪个选项卡)时,都会触发一些断点,并且我会被重定向到“源代码”选项卡,并显示消息“调试器已暂停”。问题是我没有设置任何断点,至少是有意的,这
我有一个复合 div(它有 translate3d)和一个 opacity过渡: #bad { background-color: red; -webkit-transition: o
我想为我正在制作的工具添加一个类似的功能。我对它在代码方面的工作方式很感兴趣。我希望能够获得一个 html 页面并排除除文章之外的所有内容。 最佳答案 Readability 项目对 chrome 和
我们有一个重定向到另一台服务器的 API 端点。它是通过 XHR 调用的,似乎在大多数浏览器中都能正常工作,除了 Safari(特别是在 iOS 上)。 我在控制台中遇到的错误是:跨源重定向被跨源资源
如何在 Safari 中为网页添加 IE 等页面转换效果? 最佳答案 你可以看看这个例子:http://sachiniscool.blogspot.com/2006/01/implementing-p
所以我用拇指和周围的白色边框制作了这个圆圈。一切都在每个浏览器中都能找到,除了 safari,它不会按应有的方式呈现白色边框。那我怎样才能让它工作呢? 示例 http://jsfiddle.net/v
我找遍了这个问题的解决方案,但似乎没有任何效果,如果可以避免的话,我真的不想使用 hack。 当我将 line-height 设置为垂直居中时,我的导航栏在任何地方都居中,但在 safari 中,它的
在输入字段中输入时,safari 会创建一个基于下拉列表的联系人。我不知道如何隐藏这个下拉菜单。我可以隐藏联系人按钮。 我正在运行 Safari 版本 11.0.1 重现 fiddle : https
我需要一个苹果脚本来全屏打开 safari 并隐藏小牛上的工具栏。 这听起来很容易,但事实并非如此! 我需要打开 safari,然后以全屏模式打开谷歌,然后隐藏工具栏。 这将是以下示例的等效项,但对于
嗨, friend 们,我开发了一个 safari 扩展并且也能够构建它。 但是当我尝试安装它时,会出现以下错误: “Safari 无法安装此扩展程序。安装此扩展程序时出错” 我有一个有效的 Safa
我想将使用的扩展版本报告给服务。 有没有办法从扩展中读取扩展版本号? 最佳答案 您可以使用 displayVersion 访问该版本SafariExtension 的属性(property)类(cla
我有一个禁用模式的 Safari 浏览器扩展。我想做的是在用户进入禁用模式时以编程方式更改工具栏图标。 是否有一个 API 可以让我实现这一点,如果有,它是什么? 最佳答案 您的扩展程序拥有的任何工具
Safari 有一项“功能”,可以在您输入网址时预加载页面。 现在对于大多数用户来说,这确实是一项功能,可以加快页面加载速度。但是对于 Web 开发人员来说,它可能会带来麻烦 - 特别是当它自动加载您
我们有一个正在开发中的 PHP Web 应用程序,它不应该被公众访问(但),但我们不想实现自定义解决方案来防止这种情况发生,因此我们求助于 HTTP 基本身份验证,它通常工作正常但有是 iPhone
我正在尝试查看 Safari 本地存储中保存的单个值的全部内容(它是一个长 JSON 对象)。当我查看键/值对时,该值对于屏幕来说太长了,复制该行只会复制该值的可见部分。有没有办法看到整条线? 最佳答
出于开发目的,我需要在我的计算机上的 Safari(Windows 上)中禁用同源策略。 在 Chrome 中,这可以通过使用标志 --disable-web-security 启动来完成。 Safa
我正在开发网站并创建应用程序。我想知道如何通过 safari 等网络浏览器检查元素。 在普通的 Chrome、Firefox、Explorer 或任何其他浏览器中,我们将右键单击鼠标按钮或按功能键 F
我有兴趣针对 Safari 浏览器进行一些开发,但我不确定它是否是开源项目?我知道 webkit 是开源的,但这并不意味着浏览器是开源的。 我已经给苹果发了电子邮件,但他们的回复不是很及时,所以我想知
我有一个正确的/etc/hosts 文件,其中包含以下内容: 127.0.0.1 localhost 255.255.255.255 broadcasthost ::1 l
我是一名优秀的程序员,十分优秀!