- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
我需要做的是在桌面上显示一组交错的推荐,然后当屏幕低于 979px
时切换到垂直布局。此人的图像和姓名应作为标题位于顶部,推荐文本应位于正下方。
我已经包含了一个 fiddle here .您可以看到,当视口(viewport)较宽时,布局会交错排列,但当您将其缩小时,布局会切换到更垂直的布局,以显示图像位于左侧的评价。
我需要的是让图片在右边的推荐看起来就像图片在左边的推荐。我能够做到这一点的唯一方法是使用右侧的图像更改推荐的顺序,以便将图像包装器放置在文本包装器上方并将图像包装器 float 到右侧。这样做的问题是它破坏了 inline-block
元素的 vertical-align: middle
。
我想知道是否有其他方法可以使用纯 CSS 来实现我的垂直布局目标?我知道我可以使用 Javascript 轻松做到这一点,但如果不需要,我宁愿不使用它。
这是我的代码:
img {
max-width: 100%;
height: auto;
vertical-align: middle;
border: 0;
}
.about-wrapper .spacer {
height: 75px;
}
.about-wrapper h1.customer-testimonial-header {
text-align: center;
font-size: 2rem;
font-weight: 600;
color: white;
}
.about-wrapper .bubble p {
font-size: 0.9rem;
}
.about-wrapper .bubble {
position: relative;
padding: 35px;
background: #FFFFFF;
-webkit-border-radius: 0px;
-moz-border-radius: 0px;
border-radius: 0px;
border: #cecece solid 1px;
}
.about-wrapper .bubble:after {
content: '';
position: absolute;
border-style: solid;
display: block;
width: 0;
z-index: 1;
top: 50%;
border-color: transparent #FFFFFF;
}
.about-wrapper .bubble:before {
content: '';
position: absolute;
border-style: solid;
border-color: transparent #cecece;
display: block;
width: 0;
z-index: 0;
top: 50%;
}
.about-wrapper .bubble-left:after {
border-width: 15px 20px 15px 0;
left: -19px;
}
.about-wrapper .bubble-left:before {
border-width: 15px 20px 15px 0;
left: -21px;
}
.about-wrapper .bubble-right:after {
border-width: 15px 0px 15px 20px;
right: -19px;
}
.about-wrapper .bubble-right:before {
border-width: 15px 0px 15px 20px;
right: -21px;
}
.about-wrapper .left-one-quarter {
width: 34%;
text-align: center;
}
.about-wrapper .right-three-quarter {
width: 65%;
}
.about-wrapper .right-one-quarter {
width: 34%;
text-align: center;
}
.about-wrapper .left-three-quarter {
width: 65%;
}
.about-wrapper .column {
display: inline-block;
vertical-align: middle;
}
.about-wrapper .testimonial-text:before {
content: ' ';
background: url(/skin/frontend/default/sns_nino/images/icons/quotation-start.png);
height: 16px;
width: 20px;
position: absolute;
left: 10px;
}
.about-wrapper .testimonial-text:after {
content: ' ';
background: url(/skin/frontend/default/sns_nino/images/icons/quotation-end.png);
height: 16px;
width: 20px;
position: absolute;
right: 10px;
}
.about-wrapper .testimonial-name-wrapper {
margin-top: 15px;
}
.about-wrapper .about-banner {
position: relative;
}
.about-wrapper .about-banner .banner-text {
font-size: 2.3rem;
position: absolute;
top: 50%;
}
@media (min-width: 768px) and (max-width: 979px) {
.about-wrapper .left-one-quarter {
border-top: 1px solid;
padding: 20px 0 20px 10px;
border-bottom: 1px solid;
float: left;
width: 100%;
text-align: left;
}
.about-wrapper .right-three-quarter {
width: 100%;
}
.about-wrapper .testimonial-image-wrapper {
width: 20%;
display: inline-block;
}
.about-wrapper .testimonial-name-wrapper {
float: none;
display: inline-block;
margin-top: 15px;
}
.about-wrapper .testimonial-name-wrapper > strong {
margin-left: 20px;
vertical-align: middle;
font-weight: 500;
font-size: 1.5rem;
}
.about-wrapper .testimonial-name-wrapper > span {
display: none;
}
.about-wrapper .bubble-left {
border: none;
}
.about-wrapper .bubble:after,
.about-wrapper .bubble:before {
content: none;
}
.about-wrapper .testimonial-text:before,
.about-wrapper .testimonial-text:after {
content: none;
}
}
<div class="about-wrapper">
<div class="testimonial-content">
<div class="left-one-quarter column">
<div class="testimonial-image-wrapper">
<img src="http://placekitten.com/250/250" alt="">
</div>
<div class="testimonial-name-wrapper"><strong>Example Person</strong>
<br> <span>Nowhere Ville, Alaska</span>
</div>
</div>
<div class="right-three-quarter column">
<div class="bubble-left bubble">
<p class="testimonial-text">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec eget nibh nulla. Sed tristique orci a erat semper rhoncus pretium id lacus. Morbi et justo vitae purus vestibulum consequat. Fusce mollis orci ex, eu dictum libero blandit at. Praesent
pretium tortor ipsum, sed tristique justo semper in. Fusce fringilla suscipit tempus. Cras at velit sed neque pellentesque aliquam. Sed iaculis, nisl vitae consequat feugiat, mi nibh tincidunt tortor, nec pretium lorem erat eu elit. Nullam ut
venenatis magna. Morbi tincidunt, leo sed aliquet gravida, nisi lectus consectetur enim, ac convallis purus lacus a mi. Morbi vitae tellus dolor. Aliquam neque augue, ullamcorper at lorem sed, congue dictum orci. Nunc tristique cursus augue.
Nunc rutrum elementum metus, et egestas odio posuere at. Cras vehicula fermentum elit nec pellentesque. Interdum et malesuada fames ac ante ipsum primis in faucibus. Quisque ullamcorper accumsan tortor non sollicitudin. Integer ut tortor sit
amet est cursus scelerisque. Etiam porttitor maximus justo, id imperdiet nisi fermentum sit amet. Vestibulum volutpat, ligula laoreet accumsan congue, neque leo gravida ipsum, at fermentum diam elit at nisi. Proin egestas, diam et vestibulum
lobortis, urna orci convallis risus, quis condimentum ex ligula accumsan lacus. Donec lacus libero, sodales eget condimentum eu, porta eu nulla. Ut mollis augue ac mi feugiat, sit amet tincidunt justo feugiat. Donec vel turpis vel nunc faucibus
finibus. In nec metus ullamcorper, eleifend turpis varius, sagittis sapien. Integer vehicula pharetra ornare. Curabitur vitae varius ante, in posuere lorem. Nam vel commodo nisi, ut feugiat urna. Pellentesque habitant morbi tristique senectus
et netus et malesuada fames ac turpis egestas. Interdum et malesuada fames ac ante ipsum primis in faucibus. Nunc iaculis, urna non posuere pharetra, urna libero elementum purus, a molestie neque libero sed quam. Sed vel nunc in augue placerat
vulputate in pharetra ipsum. Morbi cursus massa pellentesque risus molestie, at ultrices leo luctus. Suspendisse ac accumsan nisl. Nulla vulputate ex tortor, non pulvinar ex gravida eu. Nullam sed ipsum eu velit porta euismod et posuere tortor.
Fusce non tempus est, in viverra sem. Integer eget venenatis magna. Curabitur tristique eros ex, at convallis mi semper eu. Sed at nulla nunc. Pellentesque cursus, ante vitae hendrerit elementum, dui dolor lacinia erat, gravida lobortis orci
metus id lectus. Quisque volutpat auctor vulputate. Sed ac nisl sed urna imperdiet egestas at in dui. Donec ut ultricies felis.</p>
</div>
</div>
</div>
<div class="spacer"> </div>
<div class="testimonial-content">
<div class="left-three-quarter column">
<div class="bubble-right bubble">
<p class="testimonial-text">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec eget nibh nulla. Sed tristique orci a erat semper rhoncus pretium id lacus. Morbi et justo vitae purus vestibulum consequat. Fusce mollis orci ex, eu dictum libero blandit at. Praesent
pretium tortor ipsum, sed tristique justo semper in. Fusce fringilla suscipit tempus. Cras at velit sed neque pellentesque aliquam. Sed iaculis, nisl vitae consequat feugiat, mi nibh tincidunt tortor, nec pretium lorem erat eu elit. Nullam ut
venenatis magna. Morbi tincidunt, leo sed aliquet gravida, nisi lectus consectetur enim, ac convallis purus lacus a mi. Morbi vitae tellus dolor. Aliquam neque augue, ullamcorper at lorem sed, congue dictum orci. Nunc tristique cursus augue.
Nunc rutrum elementum metus, et egestas odio posuere at. Cras vehicula fermentum elit nec pellentesque. Interdum et malesuada fames ac ante ipsum primis in faucibus. Quisque ullamcorper accumsan tortor non sollicitudin. Integer ut tortor sit
amet est cursus scelerisque. Etiam porttitor maximus justo, id imperdiet nisi fermentum sit amet. Vestibulum volutpat, ligula laoreet accumsan congue, neque leo gravida ipsum, at fermentum diam elit at nisi. Proin egestas, diam et vestibulum
lobortis, urna orci convallis risus, quis condimentum ex ligula accumsan lacus. Donec lacus libero, sodales eget condimentum eu, porta eu nulla. Ut mollis augue ac mi feugiat, sit amet tincidunt justo feugiat. Donec vel turpis vel nunc faucibus
finibus. In nec metus ullamcorper, eleifend turpis varius, sagittis sapien. Integer vehicula pharetra ornare. Curabitur vitae varius ante, in posuere lorem. Nam vel commodo nisi, ut feugiat urna. Pellentesque habitant morbi tristique senectus
et netus et malesuada fames ac turpis egestas. Interdum et malesuada fames ac ante ipsum primis in faucibus. Nunc iaculis, urna non posuere pharetra, urna libero elementum purus, a molestie neque libero sed quam. Sed vel nunc in augue placerat
vulputate in pharetra ipsum. Morbi cursus massa pellentesque risus molestie, at ultrices leo luctus. Suspendisse ac accumsan nisl. Nulla vulputate ex tortor, non pulvinar ex gravida eu. Nullam sed ipsum eu velit porta euismod et posuere tortor.
Fusce non tempus est, in viverra sem. Integer eget venenatis magna. Curabitur tristique eros ex, at convallis mi semper eu. Sed at nulla nunc. Pellentesque cursus, ante vitae hendrerit elementum, dui dolor lacinia erat, gravida lobortis orci
metus id lectus. Quisque volutpat auctor vulputate. Sed ac nisl sed urna imperdiet egestas at in dui. Donec ut ultricies felis.</p>
</div>
</div>
<div class="right-one-quarter column">
<div class="testimonial-image-wrapper">
<img src="http://placekitten.com/250/250" alt="">
</div>
<div class="testimonial-name-wrapper"><strong>Example Person</strong>
<br> <span>Nowhere Ville, Alaska</span>
</div>
</div>
</div>
<div class="spacer"> </div>
<div class="testimonial-content">
<div class="left-one-quarter column">
<div class="testimonial-image-wrapper">
<img src="http://placekitten.com/250/250" alt="">
</div>
<div class="testimonial-name-wrapper"><strong>Example Person</strong>
<br> <span>Nowhere Ville, Alaska</span>
</div>
</div>
<div class="right-three-quarter column">
<div class="bubble-left bubble">
<p class="testimonial-text">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec eget nibh nulla. Sed tristique orci a erat semper rhoncus pretium id lacus. Morbi et justo vitae purus vestibulum consequat. Fusce mollis orci ex, eu dictum libero blandit at. Praesent
pretium tortor ipsum, sed tristique justo semper in. Fusce fringilla suscipit tempus. Cras at velit sed neque pellentesque aliquam. Sed iaculis, nisl vitae consequat feugiat, mi nibh tincidunt tortor, nec pretium lorem erat eu elit. Nullam ut
venenatis magna. Morbi tincidunt, leo sed aliquet gravida, nisi lectus consectetur enim, ac convallis purus lacus a mi. Morbi vitae tellus dolor. Aliquam neque augue, ullamcorper at lorem sed, congue dictum orci. Nunc tristique cursus augue.
Nunc rutrum elementum metus, et egestas odio posuere at. Cras vehicula fermentum elit nec pellentesque. Interdum et malesuada fames ac ante ipsum primis in faucibus. Quisque ullamcorper accumsan tortor non sollicitudin. Integer ut tortor sit
amet est cursus scelerisque. Etiam porttitor maximus justo, id imperdiet nisi fermentum sit amet. Vestibulum volutpat, ligula laoreet accumsan congue, neque leo gravida ipsum, at fermentum diam elit at nisi. Proin egestas, diam et vestibulum
lobortis, urna orci convallis risus, quis condimentum ex ligula accumsan lacus. Donec lacus libero, sodales eget condimentum eu, porta eu nulla. Ut mollis augue ac mi feugiat, sit amet tincidunt justo feugiat. Donec vel turpis vel nunc faucibus
finibus. In nec metus ullamcorper, eleifend turpis varius, sagittis sapien. Integer vehicula pharetra ornare. Curabitur vitae varius ante, in posuere lorem. Nam vel commodo nisi, ut feugiat urna. Pellentesque habitant morbi tristique senectus
et netus et malesuada fames ac turpis egestas. Interdum et malesuada fames ac ante ipsum primis in faucibus. Nunc iaculis, urna non posuere pharetra, urna libero elementum purus, a molestie neque libero sed quam. Sed vel nunc in augue placerat
vulputate in pharetra ipsum. Morbi cursus massa pellentesque risus molestie, at ultrices leo luctus. Suspendisse ac accumsan nisl. Nulla vulputate ex tortor, non pulvinar ex gravida eu. Nullam sed ipsum eu velit porta euismod et posuere tortor.
Fusce non tempus est, in viverra sem. Integer eget venenatis magna. Curabitur tristique eros ex, at convallis mi semper eu. Sed at nulla nunc. Pellentesque cursus, ante vitae hendrerit elementum, dui dolor lacinia erat, gravida lobortis orci
metus id lectus. Quisque volutpat auctor vulputate. Sed ac nisl sed urna imperdiet egestas at in dui. Donec ut ultricies felis.</p>
</div>
</div>
</div>
</div>
最佳答案
使用 flexbox
(在 IE10+ 中有部分支持)你可以使用 order
和 align-self
实现这一点
你只需要处理左边的泡泡,让它变成右边的泡泡。
/*new*/
@media (max-width: 979px) {
.testimonial-content {
display: flex
}
.right-three-quarter {
order: -1
}
.about-wrapper .column {
align-self: center
}
}
img {
max-width: 100%;
height: auto;
vertical-align: middle;
border: 0;
}
.about-wrapper .spacer {
height: 75px;
}
.about-wrapper h1.customer-testimonial-header {
text-align: center;
font-size: 2rem;
font-weight: 600;
color: white;
}
.about-wrapper .bubble p {
font-size: 0.9rem;
}
.about-wrapper .bubble {
position: relative;
padding: 35px;
background: #FFFFFF;
-webkit-border-radius: 0px;
-moz-border-radius: 0px;
border-radius: 0px;
border: #cecece solid 1px;
}
.about-wrapper .bubble:after {
content: '';
position: absolute;
border-style: solid;
display: block;
width: 0;
z-index: 1;
top: 50%;
border-color: transparent #FFFFFF;
}
.about-wrapper .bubble:before {
content: '';
position: absolute;
border-style: solid;
border-color: transparent #cecece;
display: block;
width: 0;
z-index: 0;
top: 50%;
}
.about-wrapper .bubble-left:after {
border-width: 15px 20px 15px 0;
left: -19px;
}
.about-wrapper .bubble-left:before {
border-width: 15px 20px 15px 0;
left: -21px;
}
.about-wrapper .bubble-right:after {
border-width: 15px 0px 15px 20px;
right: -19px;
}
.about-wrapper .bubble-right:before {
border-width: 15px 0px 15px 20px;
right: -21px;
}
.about-wrapper .left-one-quarter {
width: 34%;
text-align: center;
}
.about-wrapper .right-three-quarter {
width: 65%;
}
.about-wrapper .right-one-quarter {
width: 34%;
text-align: center;
}
.about-wrapper .left-three-quarter {
width: 65%;
}
.about-wrapper .column {
display: inline-block;
vertical-align: middle;
}
.about-wrapper .testimonial-text:before {
content: ' ';
background: url(/skin/frontend/default/sns_nino/images/icons/quotation-start.png);
height: 16px;
width: 20px;
position: absolute;
left: 10px;
}
.about-wrapper .testimonial-text:after {
content: ' ';
background: url(/skin/frontend/default/sns_nino/images/icons/quotation-end.png);
height: 16px;
width: 20px;
position: absolute;
right: 10px;
}
.about-wrapper .testimonial-name-wrapper {
margin-top: 15px;
}
.about-wrapper .about-banner {
position: relative;
}
.about-wrapper .about-banner .banner-text {
font-size: 2.3rem;
position: absolute;
top: 50%;
}
@media (min-width: 768px) and (max-width: 979px) {
.about-wrapper .left-one-quarter {
border-top: 1px solid;
padding: 20px 0 20px 10px;
border-bottom: 1px solid;
float: left;
width: 100%;
text-align: left;
}
.about-wrapper .right-three-quarter {
width: 100%;
}
.about-wrapper .testimonial-image-wrapper {
width: 20%;
display: inline-block;
}
.about-wrapper .testimonial-name-wrapper {
float: none;
display: inline-block;
margin-top: 15px;
}
.about-wrapper .testimonial-name-wrapper > strong {
margin-left: 20px;
vertical-align: middle;
font-weight: 500;
font-size: 1.5rem;
}
.about-wrapper .testimonial-name-wrapper > span {
display: none;
}
.about-wrapper .bubble-left {
border: none;
}
.about-wrapper .bubble:after,
.about-wrapper .bubble:before {
content: none;
}
.about-wrapper .testimonial-text:before,
.about-wrapper .testimonial-text:after {
content: none;
}
}
<div class="about-wrapper">
<div class="testimonial-content">
<div class="left-one-quarter column">
<div class="testimonial-image-wrapper">
<img src="http://placekitten.com/250/250" alt="">
</div>
<div class="testimonial-name-wrapper"><strong>Example Person</strong>
<br> <span>Nowhere Ville, Alaska</span>
</div>
</div>
<div class="right-three-quarter column">
<div class="bubble-left bubble">
<p class="testimonial-text">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec eget nibh nulla. Sed tristique orci a erat semper rhoncus pretium id lacus. Morbi et justo vitae purus vestibulum consequat. Fusce mollis orci ex, eu dictum libero blandit at. Praesent
pretium tortor ipsum, sed tristique justo semper in. Fusce fringilla suscipit tempus. Cras at velit sed neque pellentesque aliquam. Sed iaculis, nisl vitae consequat feugiat, mi nibh tincidunt tortor, nec pretium lorem erat eu elit. Nullam ut
venenatis magna. Morbi tincidunt, leo sed aliquet gravida, nisi lectus consectetur enim, ac convallis purus lacus a mi. Morbi vitae tellus dolor. Aliquam neque augue, ullamcorper at lorem sed, congue dictum orci. Nunc tristique cursus augue.
Nunc rutrum elementum metus, et egestas odio posuere at. Cras vehicula fermentum elit nec pellentesque. Interdum et malesuada fames ac ante ipsum primis in faucibus. Quisque ullamcorper accumsan tortor non sollicitudin. Integer ut tortor sit
amet est cursus scelerisque. Etiam porttitor maximus justo, id imperdiet nisi fermentum sit amet. Vestibulum volutpat, ligula laoreet accumsan congue, neque leo gravida ipsum, at fermentum diam elit at nisi. Proin egestas, diam et vestibulum
lobortis, urna orci convallis risus, quis condimentum ex ligula accumsan lacus. Donec lacus libero, sodales eget condimentum eu, porta eu nulla. Ut mollis augue ac mi feugiat, sit amet tincidunt justo feugiat. Donec vel turpis vel nunc faucibus
finibus. In nec metus ullamcorper, eleifend turpis varius, sagittis sapien. Integer vehicula pharetra ornare. Curabitur vitae varius ante, in posuere lorem. Nam vel commodo nisi, ut feugiat urna. Pellentesque habitant morbi tristique senectus
et netus et malesuada fames ac turpis egestas. Interdum et malesuada fames ac ante ipsum primis in faucibus. Nunc iaculis, urna non posuere pharetra, urna libero elementum purus, a molestie neque libero sed quam. Sed vel nunc in augue placerat
vulputate in pharetra ipsum. Morbi cursus massa pellentesque risus molestie, at ultrices leo luctus. Suspendisse ac accumsan nisl. Nulla vulputate ex tortor, non pulvinar ex gravida eu. Nullam sed ipsum eu velit porta euismod et posuere tortor.
Fusce non tempus est, in viverra sem. Integer eget venenatis magna. Curabitur tristique eros ex, at convallis mi semper eu. Sed at nulla nunc. Pellentesque cursus, ante vitae hendrerit elementum, dui dolor lacinia erat, gravida lobortis orci
metus id lectus. Quisque volutpat auctor vulputate. Sed ac nisl sed urna imperdiet egestas at in dui. Donec ut ultricies felis.</p>
</div>
</div>
</div>
<div class="spacer"> </div>
<div class="testimonial-content">
<div class="left-three-quarter column">
<div class="bubble-right bubble">
<p class="testimonial-text">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec eget nibh nulla. Sed tristique orci a erat semper rhoncus pretium id lacus. Morbi et justo vitae purus vestibulum consequat. Fusce mollis orci ex, eu dictum libero blandit at. Praesent
pretium tortor ipsum, sed tristique justo semper in. Fusce fringilla suscipit tempus. Cras at velit sed neque pellentesque aliquam. Sed iaculis, nisl vitae consequat feugiat, mi nibh tincidunt tortor, nec pretium lorem erat eu elit. Nullam ut
venenatis magna. Morbi tincidunt, leo sed aliquet gravida, nisi lectus consectetur enim, ac convallis purus lacus a mi. Morbi vitae tellus dolor. Aliquam neque augue, ullamcorper at lorem sed, congue dictum orci. Nunc tristique cursus augue.
Nunc rutrum elementum metus, et egestas odio posuere at. Cras vehicula fermentum elit nec pellentesque. Interdum et malesuada fames ac ante ipsum primis in faucibus. Quisque ullamcorper accumsan tortor non sollicitudin. Integer ut tortor sit
amet est cursus scelerisque. Etiam porttitor maximus justo, id imperdiet nisi fermentum sit amet. Vestibulum volutpat, ligula laoreet accumsan congue, neque leo gravida ipsum, at fermentum diam elit at nisi. Proin egestas, diam et vestibulum
lobortis, urna orci convallis risus, quis condimentum ex ligula accumsan lacus. Donec lacus libero, sodales eget condimentum eu, porta eu nulla. Ut mollis augue ac mi feugiat, sit amet tincidunt justo feugiat. Donec vel turpis vel nunc faucibus
finibus. In nec metus ullamcorper, eleifend turpis varius, sagittis sapien. Integer vehicula pharetra ornare. Curabitur vitae varius ante, in posuere lorem. Nam vel commodo nisi, ut feugiat urna. Pellentesque habitant morbi tristique senectus
et netus et malesuada fames ac turpis egestas. Interdum et malesuada fames ac ante ipsum primis in faucibus. Nunc iaculis, urna non posuere pharetra, urna libero elementum purus, a molestie neque libero sed quam. Sed vel nunc in augue placerat
vulputate in pharetra ipsum. Morbi cursus massa pellentesque risus molestie, at ultrices leo luctus. Suspendisse ac accumsan nisl. Nulla vulputate ex tortor, non pulvinar ex gravida eu. Nullam sed ipsum eu velit porta euismod et posuere tortor.
Fusce non tempus est, in viverra sem. Integer eget venenatis magna. Curabitur tristique eros ex, at convallis mi semper eu. Sed at nulla nunc. Pellentesque cursus, ante vitae hendrerit elementum, dui dolor lacinia erat, gravida lobortis orci
metus id lectus. Quisque volutpat auctor vulputate. Sed ac nisl sed urna imperdiet egestas at in dui. Donec ut ultricies felis.</p>
</div>
</div>
<div class="right-one-quarter column">
<div class="testimonial-image-wrapper">
<img src="http://placekitten.com/250/250" alt="">
</div>
<div class="testimonial-name-wrapper"><strong>Example Person</strong>
<br> <span>Nowhere Ville, Alaska</span>
</div>
</div>
</div>
<div class="spacer"> </div>
<div class="testimonial-content">
<div class="left-one-quarter column">
<div class="testimonial-image-wrapper">
<img src="http://placekitten.com/250/250" alt="">
</div>
<div class="testimonial-name-wrapper"><strong>Example Person</strong>
<br> <span>Nowhere Ville, Alaska</span>
</div>
</div>
<div class="right-three-quarter column">
<div class="bubble-left bubble">
<p class="testimonial-text">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec eget nibh nulla. Sed tristique orci a erat semper rhoncus pretium id lacus. Morbi et justo vitae purus vestibulum consequat. Fusce mollis orci ex, eu dictum libero blandit at. Praesent
pretium tortor ipsum, sed tristique justo semper in. Fusce fringilla suscipit tempus. Cras at velit sed neque pellentesque aliquam. Sed iaculis, nisl vitae consequat feugiat, mi nibh tincidunt tortor, nec pretium lorem erat eu elit. Nullam ut
venenatis magna. Morbi tincidunt, leo sed aliquet gravida, nisi lectus consectetur enim, ac convallis purus lacus a mi. Morbi vitae tellus dolor. Aliquam neque augue, ullamcorper at lorem sed, congue dictum orci. Nunc tristique cursus augue.
Nunc rutrum elementum metus, et egestas odio posuere at. Cras vehicula fermentum elit nec pellentesque. Interdum et malesuada fames ac ante ipsum primis in faucibus. Quisque ullamcorper accumsan tortor non sollicitudin. Integer ut tortor sit
amet est cursus scelerisque. Etiam porttitor maximus justo, id imperdiet nisi fermentum sit amet. Vestibulum volutpat, ligula laoreet accumsan congue, neque leo gravida ipsum, at fermentum diam elit at nisi. Proin egestas, diam et vestibulum
lobortis, urna orci convallis risus, quis condimentum ex ligula accumsan lacus. Donec lacus libero, sodales eget condimentum eu, porta eu nulla. Ut mollis augue ac mi feugiat, sit amet tincidunt justo feugiat. Donec vel turpis vel nunc faucibus
finibus. In nec metus ullamcorper, eleifend turpis varius, sagittis sapien. Integer vehicula pharetra ornare. Curabitur vitae varius ante, in posuere lorem. Nam vel commodo nisi, ut feugiat urna. Pellentesque habitant morbi tristique senectus
et netus et malesuada fames ac turpis egestas. Interdum et malesuada fames ac ante ipsum primis in faucibus. Nunc iaculis, urna non posuere pharetra, urna libero elementum purus, a molestie neque libero sed quam. Sed vel nunc in augue placerat
vulputate in pharetra ipsum. Morbi cursus massa pellentesque risus molestie, at ultrices leo luctus. Suspendisse ac accumsan nisl. Nulla vulputate ex tortor, non pulvinar ex gravida eu. Nullam sed ipsum eu velit porta euismod et posuere tortor.
Fusce non tempus est, in viverra sem. Integer eget venenatis magna. Curabitur tristique eros ex, at convallis mi semper eu. Sed at nulla nunc. Pellentesque cursus, ante vitae hendrerit elementum, dui dolor lacinia erat, gravida lobortis orci
metus id lectus. Quisque volutpat auctor vulputate. Sed ac nisl sed urna imperdiet egestas at in dui. Donec ut ultricies felis.</p>
</div>
</div>
</div>
</div>
关于html - 根据屏幕尺寸 CSS 重新排序 float 元素,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37898712/
我知道问题的标题听起来很奇怪,但我不知道该怎么调用它。 首先,我有一个网格布局,我希望我的 .search-wrapper 宽度为 50% 并向右浮动。在我的演示中 jsfiddle整个 .searc
我们正在使用 QA-C 来实现 MISRA C++ 一致性,但是该工具会为这样的代码喷出错误: float a = foo(); float b = bar(); float c = a - b; 据
考虑 float a[] = { 0.1, 0.2, 0.3}; 我很困惑a稍后传递给函数 foo(float* A) .不应该是 float* 类型的变量指向单个浮点数,对吗?就像这里提到的tu
这可能是我一段时间以来收到的最好的错误消息,我很好奇出了什么问题。 原代码 float currElbowAngle = LeftArm ? Elbow.transform.localRotation
刚开始学习 F#,我正在尝试为 e 生成和评估泰勒级数的前 10 项。我最初编写了这段代码来计算它: let fact n = function | 0 -> 1 | _ -> [1
我已经使用 Erlang 读取二进制文件中的 4 个字节(小端)。 在尝试将二进制转换为浮点时,我一直遇到以下错误: ** exception error: bad argument in
假设我有: float a = 3 // (gdb) p/f a = 3 float b = 299792458 // (gdb) p/f b = 29979244
我每次都想在浏览器顶部修复这个框。但是右边有一些问题我不知道如何解决所以我寻求帮助。 #StickyBar #RightSideOfStickyBar { float : right ; }
我正在研究 C# 编译器并试图理解数学运算规则。 我发现在两种不同的原始类型之间使用 == 运算符时会出现难以理解的行为。 int a = 1; float b = 1.0f; Cons
假设我有: float a = 3 // (gdb) p/f a = 3 float b = 299792458 // (gdb) p/f b = 29979244
Denormals众所周知,与正常情况相比,表现严重不佳,大约是 100 倍。这经常导致 unexpected软件 problems . 我很好奇,从 CPU 架构的角度来看,为什么非规范化必须是 那
我有一个由两个 float 组成的区间,并且需要生成 20 个随机数,看起来介于两个 float 定义的区间之间。 比方说: float a = 12.49953f float b = 39.1123
我正在构建如下矩阵: QMatrix4x3 floatPos4x3 = QMatrix4x3( floatPos0.at(0), floatPos1.at(0), floatPos2.at(0),
给定归一化的浮点数f,在f之前/之后的下一个归一化浮点数是多少。 通过微动,提取尾数和指数,我得到了: next_normalized(double&){ if mantissa is n
关于 CSS“float”属性的某些东西一直让我感到困惑。为什么将“float”属性应用到您希望 float 的元素之前的元素? 为了帮助可视化我的问题,我创建了以下 jsFiddle http://
关于 CSS“float”属性的某些东西一直让我感到困惑。为什么将“float”属性应用到您希望 float 的元素之前的元素? 为了帮助可视化我的问题,我创建了以下 jsFiddle http://
我有一个新闻源/聊天框。每个条目包含两个跨度:#user 和#message。我希望#user 向左浮动,而#message 向左浮动。如果#message 导致行超过容器宽度,#message 应该
我想创建一个“记分卡”网格来输出一些数据。如果每个 div.item 中的数据都具有相同的高度,那么在每个 div.item 上留下一个简单的 float 会提供一个漂亮的均匀布局,它可以根据浏览器大
我正在学习使用 CSS float 属性。我想了解此属性的特定效果。 考虑以下简单的 HTML 元素: div1 div2 This is a paragraph 以及以下 CSS 规则: div {
我正在尝试从可以是 int 或 float 的文件中提取数据。我发现这个正则表达式将从文件 (\d+(\.\d+)?) 中提取这两种类型,但我遇到的问题是它将 float 拆分为两个。 >>> imp
我是一名优秀的程序员,十分优秀!