- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
我遇到了一个奇怪的错误,我试图 float 我的表格单元格( block 级别和 100% 宽度)并且它们最终并排放置,而第一个单元格表现正常。您正在专门寻找 header 。
我正在使用表格,因为这是一封电子邮件。
在其他浏览器中它们会正常折叠,但在 Chrome 桌面版 和 移动版 上它们不会!
我也尝试过对细胞进行 clearfixing...
http://jsfiddle.net/us600sos/ - jsfiddle 显示得很好,即使在 Chrome 中也是如此。那是什么?!
http://news.yfish.co.uk/e/B3936E5E801047F09407600602EBA805/4/preview/ -这是您可以测试以查看错误的版本(向下响应)
<html>
<head>
<title>Template</title>
<meta charset=utf-8>
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<style type="text/css">
#outlook a { padding: 0; }
.ReadMsgBody { width: 100%; } .ExternalClass { width:100%; }
.ExternalClass, .ExternalClass p, .ExternalClass span, .ExternalClass font, .ExternalClass td, .ExternalClass div { line-height: 100%; }
body, table, td, a { -webkit-text-size-adjust: 100%; -ms-text-size-adjust: 100%; }
table, td { mso-table-lspace: 0pt; mso-table-rspace: 0pt; }
img { -ms-interpolation-mode: bicubic; }
body { margin: 0; padding: 0; }
img { border: 0; height: auto; line-height: 100%; outline: none; text-decoration: none; }
table { border-collapse: collapse!important; }
body { height: 100%!important; margin: 0; padding: 0; width: 100%!important; background-color: #ffffff; }
a:visited { color: #414141; }
@media screen {
@font-face {
font-family: 'humanst';
src: url(humanist-521-bold.eot); /* IE9 Compat Modes */
src: url(humanist-521-bold.woff) format('woff'), /* Modern Browsers */
url(humanist-521-bold.ttf) format('truetype'), /* Safari, Android, iOS */
url(humanist-521-bold.svg) format('svg'); /* Legacy iOS */
}
}
.facebook, .twitter, .mail {
display: block;
border-radius: 100%;
overflow: visible;
-webkit-transition: all 1.2s ease; /* Safari and Chrome */
-moz-transition: all 1.2s ease; /* Firefox */
-ms-transition: all 1.2s ease; /* IE 9 */
-o-transition: all 1.2s ease; /* Opera */
transition: all 1.2s ease;
border: 2px solid #ffffff;
}
.facebook:hover {
background-color: #718fcb;
border: 2px solid #718fcb;
}
.twitter:hover {
background-color: #61c4e4;
border: 2px solid #61c4e4;
}
.mail:hover {
background-color: #bfbfbf;
border: 2px solid #bfbfbf;
}
.full-width-cell {
*zoom: 1;
}
.full-width-cell:before,
.full-width-cell:after {
display: table;
line-height: 0;
content: "";
}
.full-width-cell:after {
clear: both;
}
/* Animated Fish */
.swi {
-webkit-animation: fishSwim 10s ease 4s infinite;
-moz-animation: fishSwim 10s ease 4s infinite;
-o-animation: fishSwim 10s ease 4s infinite;
animation: fishSwim 10s ease 4s infinite;
}
@-webkit-keyframes fishSwim {
0% { -webkit-transform: translatex(0); }
20% { -webkit-transform: translatex(230px); }
20.1% { -webkit-transform: translatex(230px) scaleX(-1); }
50% { -webkit-transform: translatex(-180px) scaleX(-1); }
65% { -webkit-transform: translatex(-270px) scaleX(-1); }
65.1% { -webkit-transform: translatex(-270px) scaleX(1); }
100% { -webkit-transform: translatex(0) scaleX(1); }
}
@-moz-keyframes fishSwim {
0% { -moz-transform: translatex(0); }
20% { -moz-transform: translatex(230px); }
20.1% { -moz-transform: translatex(230px) scaleX(-1); }
50% { -moz-transform: translatex(-180px) scaleX(-1); }
65% { -moz-transform: translatex(-270px) scaleX(-1); }
65.1% { -moz-transform: translatex(-270px) scaleX(1); }
100% { -moz-transform: translatex(0) scaleX(1); }
}
@-o-keyframes fishSwim {
0% { -o-transform: translatex(0); }
20% { -o-transform: translatex(230px); }
20.1% { -o-transform: translatex(230px) scaleX(-1); }
50% { -o-transform: translatex(-180px) scaleX(-1); }
65% { -o-transform: translatex(-270px) scaleX(-1); }
65.1% { -o-transform: translatex(-270px) scaleX(1); }
100% { -o-transform: translatex(0) scaleX(1); }
}
@keyframes fishSwim {
0% { transform: translatex(0); }
20% { transform: translatex(230px); }
20.1% { transform: translatex(230px) scaleX(-1); }
50% { transform: translatex(-180px) scaleX(-1); }
65% { transform: translatex(-270px) scaleX(-1); }
65.1% { transform: translatex(-270px) scaleX(1); }
100% { transform: translatex(0) scaleX(1); }
}
/* Icons Fade Down */
.facebook, .twitter, .mail {
-webkit-animation: fadeInDown 1.2s forwards;
-moz-animation: fadeInDown 1.2s forwards;
-o-animation: fadeInDown 1.2s forwards;
animation: fadeInDown 1.2s forwards;
}
@-webkit-keyframes fadeInDown {
0% {opacity: 0; -webkit-transform: translateY(-30px);}
40% {opacity: 0; -webkit-transform: translateY(-30px);}
100% {opacity: 1; -webkit-transform: translateY(0);}
}
@-moz-keyframes fadeInDown {
0% {opacity: 0; -moz-transform: translateY(-30px);}
40% {opacity: 0; -moz-transform: translateY(-30px);}
100% {opacity: 1; -moz-transform: translateY(0);}
}
@-o-keyframes fadeInDown {
0% {opacity: 0; -o-transform: translateY(-30px);}
40% {opacity: 0; -o-transform: translateY(-30px);}
100% {opacity: 1; -o-transform: translateY(0);}
}
@keyframes fadeInDown {
0% {opacity: 0; transform: translateY(-30px);}
40% {opacity: 0; transform: translateY(-30px);}
100% {opacity: 1; transform: translateY(0);}
}
/* Title Fade */
.fade {
-webkit-animation: fadeIn 2.5s ease forwards;
-moz-animation: fadeIn 2.5s ease forwards;
-o-animation: fadeIn 2.5s ease forwards;
animation: fadeIn 2.5s ease forwards;
}
@-webkit-keyframes fadeIn {
0% { opacity: 0; visibility: visible; }
50% { opacity: 0; visibility: visible; }
100 { opacity: 1; visibility: visible; }
}
@-moz-keyframes fadeIn {
0% { opacity: 0; visibility: visible; }
50% { opacity: 0; visibility: visible; }
100 { opacity: 1; visibility: visible; }
}
@-o-keyframes fadeIn {
0% { opacity: 0; visibility: visible; }
50% { opacity: 0; visibility: visible; }
100 { opacity: 1; visibility: visible; }
}
@keyframes fadeIn {
0% { opacity: 0; visibility: visible; }
50% { opacity: 0; visibility: visible; }
100 { opacity: 1; visibility: visible; }
}
/* Image fades */
/* Left */
.imgFadeInLeft {
-webkit-animation: fadeInLeft 3s forwards;
-moz-animation: fadeInLeft 3s forwards;
-o-animation: fadeInLeft 3s forwards;
animation: fadeInLeft 3s forwards;
}
@-webkit-keyframes fadeInLeft {
0% {opacity: 0; -webkit-transform: translateX(-50px);}
70% {opacity: 0; -webkit-transform: translateX(-50px);}
100% {opacity: 1; -webkit-transform: translateX(0);}
}
@-moz-keyframes fadeInLeft {
0% {opacity: 0; -moz-transform: translateX(-50px);}
70% {opacity: 0; -moz-transform: translateX(-50px);}
100% {opacity: 1; -moz-transform: translateX(0);}
}
@-o-keyframes fadeInLeft {
0% {opacity: 0; -o-transform: translateX(-50px);}
70% {opacity: 0; -o-transform: translateX(-50px);}
100% {opacity: 1; -o-transform: translateX(0);}
}
@keyframes fadeInLeft {
0% {opacity: 0; transform: translateX(-50px);}
70% {opacity: 0; transform: translateX(-50px);}
100% {opacity: 1; transform: translateX(0);}
}
/* Down */
.imgFadeInDown {
-webkit-animation: imagefadeInDown 3s forwards;
-moz-animation: imagefadeInDown 3s forwards;
-o-animation: imagefadeInDown 3s forwards;
animation: imagefadeInDown 3s forwards;
}
@-webkit-keyframes imagefadeInDown {
0% {opacity: 0; -webkit-transform: translateY(-50px);}
70% {opacity: 0; -webkit-transform: translateY(-50px);}
100% {opacity: 1; -webkit-transform: translateY(0);}
}
@-moz-keyframes imagefadeInDown {
0% {opacity: 0; -moz-transform: translateY(-50px);}
70% {opacity: 0; -moz-transform: translateY(-50px);}
100% {opacity: 1; -moz-transform: translateY(0);}
}
@-o-keyframes imagefadeInDown {
0% {opacity: 0; -o-transform: translateY(-50px);}
70% {opacity: 0; -o-transform: translateY(-50px);}
100% {opacity: 1; -o-transform: translateY(0);}
}
@keyframes imagefadeInDown {
0% {opacity: 0; transform: translateY(-50px);}
70% {opacity: 0; transform: translateY(-50px);}
100% {opacity: 1; transform: translateY(0);}
}
/* Right */
.imgFadeInRight {
-webkit-animation: imagefadeInRight 3s forwards;
-moz-animation: imagefadeRight 3s forwards;
-o-animation: imagefadeInRight 3s forwards;
animation: imagefadeInRight 3s forwards;
}
@-webkit-keyframes imagefadeInRight {
0% {opacity: 0; -webkit-transform: translateX(50px);}
70% {opacity: 0; -webkit-transform: translateX(50px);}
100% {opacity: 1; -webkit-transform: translateX(0);}
}
@-moz-keyframes imagefadeInRight {
0% {opacity: 0; -moz-transform: translateX(50px);}
70% {opacity: 0; -moz-transform: translateX(50px);}
100% {opacity: 1; -moz-transform: translateX(0);}
}
@-o-keyframes imagefadeInRight {
0% {opacity: 0; -o-transform: translateX(50px);}
70% {opacity: 0; -o-transform: translateX(50px);}
100% {opacity: 1; -o-transform: translateX(0);}
}
@keyframes imagefadeInRight {
0% {opacity: 0; transform: translateX(50px);}
70% {opacity: 0; transform: translateX(50px);}
100% {opacity: 1; transform: translateX(0);}
}
/* Up */
.imgFadeInUp {
-webkit-animation: imagefadeInUp 3s forwards;
-moz-animation: imagefadeInUp 3s forwards;
-o-animation: imagefadeInUp 3s forwards;
animation: imagefadeInUp 3s forwards;
}
@-webkit-keyframes imagefadeInUp {
0% {opacity: 0; -webkit-transform: translateY(50px);}
70% {opacity: 0; -webkit-transform: translateY(50px);}
100% {opacity: 1; -webkit-transform: translateX(0);}
}
@-moz-keyframes imagefadeInUp {
0% {opacity: 0; -moz-transform: translateY(50px);}
70% {opacity: 0; -moz-transform: translateY(50px);}
100% {opacity: 1; -moz-transform: translateX(0);}
}
@-o-keyframes imagefadeInUp {
0% {opacity: 0; -o-transform: translateY(50px);}
70% {opacity: 0; -o-transform: translateY(50px);}
100% {opacity: 1; -o-transform: translateX(0);}
}
@keyframes imagefadeInUp {
0% {opacity: 0; transform: translateY(50px);}
70% {opacity: 0; transform: translateY(50px);}
100% {opacity: 1; transform: translateX(0);}
}
#zoom a {
display: block;
overflow: hidden!important;
}
#zoom img, .img-cell-one, .img-cell-two {
-webkit-transition: all 2s ease; /* Safari and Chrome */
-moz-transition: all 2s ease; /* Firefox */
-ms-transition: all 2s ease; /* IE 9 */
-o-transition: all 2s ease; /* Opera */
transition: all 2s ease;
}
#zoom img:hover {
-webkit-transform: scale(1.07); /* Safari and Chrome */
-moz-transform: scale(1.07); /* Firefox */
-ms-transform: scale(1.07); /* IE 9 */
-o-transform: scale(1.07); /* Opera */
transform: scale(1.07);
}
@media screen and (max-width: 740px), and screen (max-device-width: 740px) {
body { width: auto!important; }
table[class="full-width"] { display: block!important; width: 100%!important; }
td[class="full-width-cell"] { display: block!important; width: 100%!important; float: left!important; padding: 0!important; text-align: center!important; }
table[class="content-width"] { display: block!important; width: 96%!important; float: none!important; margin: 0 auto!important; }
img[id="title"] { width: 100%!important; height: auto!important; }
td[class="img-cell-one"] { width: 42%!important; float: left!important; display: block!important; }
td[class="img-cell-two"] { width: 58%!important; float: left!important; display: block!important; }
img[class="img-scale"] { width: 100%!important; height: auto!important; }
img[class="think-tank"] { float: none!important; margin: 0 auto!important; }
table[class="tagline-table"] { display: block!important; float: none!important; margin: 0 auto 20px auto!important; }
td[id="view-padding"] { padding-top: 20px!important; padding-bottom: 20px!important; }
table[class="social"] { display: block!important; margin: 0 auto!important; }
div[class="center-header"] { width: 100%!important; max-width: 357px!important; margin: 0 auto!important; }
td[id="featured-padding"] { padding: 0 20px 0 20px!important; }
td[id="title-cell"] { padding: 0 20px 0 20px!important; }
[class="mobile-hide"] { display: none!important; }
}
@media screen and (max-width: 520px), and screen (max-device-width: 520px) {
td[class="gallery-split"] { display: block!important; width: 50%!important; float: left!important; }
td[class="img-cell-one"] { width: 100%!important; float: left!important; display: block!important; }
div[class="gallery"] { overflow: hidden!important; width: 100%; max-width: 480px; margin: 0 auto!important; }
td[class="img-cell-two"] { width: 100%!important; clear: both!important; display: block!important; }
div[class="gallery-bottom"] { width: 100%!important; float: right!important; }
[class="block"] { display: block!important; width: 100%!important; }
div[class="img-large"] { max-height: 150px; overflow: hidden; }
td[id="gallery-clear"] { clear: both!important; }
.img-cell-one, .img-cell-two {
-webkit-transition: all 1s ease; /* Safari and Chrome */
-moz-transition: all 1s ease; /* Firefox */
-ms-transition: all 1s ease; /* IE 9 */
-o-transition: all 1s ease; /* Opera */
transition: all 1s ease;
}
}
</style>
</head>
<body bottommargin="0" leftmargin="0" marginheight="0" marginwidth="0" rightmargin="0" topmargin="0" bgcolor="#ffffff">
<table width="100%" cellpadding="0" cellspacing="0" border="0" align="center" bgcolor="#fec10d" style="background-color: #fec10d;"><!-- wrapper -->
<tr>
<td bgcolor="#fec10d">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td valign="top" class="full-width-cell">
<div class="center-header"><!-- ISSUE STARTS HERE-->
<table width="99%" cellpadding="0" cellspacing="0" border="0" align="left" class="full-width"><!-- header -->
<tr class="block">
<td height="25">
</td>
</tr>
<tr class="block">
<td width="33%" style="padding-left: 20px;" class="full-width-cell">
<div class="clearfix">
<table width="354" cellpadding="0" cellspacing="0" border="0" align="left" class="tagline-table">
<tr>
<td>
<img src="think-tank.png" width="354" height="19" alt="THINK OUTSIDE THE TANK" border="0" style="display: block; border: 0;" class="img-scale">
</td>
</tr>
</table>
</div>
</td>
<td width="33%" align="center" class="full-width-cell">
<div class="clearfix">
<table width="68" cellpadding="0" cellspacing="0" border="0" align="center">
<tr>
<td>
<a href="http://www.yfish.co.uk/"><img src="logo.png" width="68" height="21" alt="Yellow Fish" border="0" style="display: block; border: 0;" class="logo"></a>
</td>
</tr>
</table>
</div>
</td>
<td width="33%" style="font-family: 'humanst', arial, helvetica, sans-serif; font-size: 11px; color: #ffffff; line-height: 15px; text-align: right; vertical-align: middle; padding-right: 20px;" valign="middle" class="full-width-cell" id="view-padding">
<a href="[*Hosted*]" style="color: #ffffff; text-decoration: none;">It's a crime, not to view online</a>
</td>
</tr>
<tr class="block">
<td height="25" colspan="3">
</td>
</tr>
</table><!-- end header -->
<div>
</td>
</tr>
</table>
</td>
</tr>
</table>
最佳答案
首先我会说我喜欢您在电子邮件中使用动画。看起来很棒!希望您至少可以让一些浏览器显示它。
现在...我没有看到标题周围的 div 有任何需要,没有它,单元格重新调整大小就好了。删除 float ,它们将无法在电子邮件客户端中工作,并且对齐在浏览器的 float 位置中工作得很好。我花了一段时间才弄明白,但你缺少你的文档类型。我还添加了我使用的字符集定义的版本。
我建议用这个替换您电子邮件的顶部:
<!DOCTYPE HTML>
<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<meta content="width=device-width, initial-scale=1" name="viewport" />
您的单元格现在可以很好地堆叠并且一切都居中。我不需要做太多更改,但如果您想将它与您的代码进行比较,这是我的代码版本:http://jsfiddle.net/nivicious/xbmx3bwc/
关于css - 奇怪的谷歌浏览器 float 错误 - 在其他浏览器中正常,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28413184/
我知道问题的标题听起来很奇怪,但我不知道该怎么调用它。 首先,我有一个网格布局,我希望我的 .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
我是一名优秀的程序员,十分优秀!