当您查看http://www.campaignmonitor.com/css/时,您了解到需要在HTML中嵌入内联样式,以便在任何邮件客户端中读取您的电子邮件.
您是否知道任何工具或脚本可以自动将声明的HTML文件转换为仅包含内联CCS样式属性的HTML文件?
编辑:任何Javascript解决方案(即:http://www.robertnyman.com/2006/04/24/get-the-rendered-style-of-an-element/)?用jQuery?
我已经开发了十多年的网站了,但很快就发现,在为电子邮件客户开发时,我开发网络的许多习惯都没用.这让我感到非常沮丧,所以我想我会提出一个问题,希望能够为像我这样的人发现最佳实践和必要的考虑因素,这些人可能会不时地设计gmail,outlook等.
示例: <style>...</style> vs内联CSS.
简而言之:什么从网络世界转移到电子邮件世界,什么没有.
我正在尝试创建一个包含/排除基于最大宽度和设备像素比率的规则.一个例子是如果我想要排除Kindle Fire @ 600px,而是要触发iPhone5 @ 640(更小的真实世界屏幕).
以下是否制定AND或OR规则?假设它生成OR规则,我将如何创建执行AND类型函数的规则(必须同时传递'设备像素比率2'和'max-width 749px'检查才能被触发)
@media only screen and (min--moz-device-pixel-ratio: 2),
only screen and (-o-min-device-pixel-ratio: 2/1),
only screen and (-webkit-min-device-pixel-ratio: 2),
only screen and (min-device-pixel-ratio: 2),
only screen and (max-width: 749px){
}
Run Code Online (Sandbox Code Playgroud)
编辑以下:
好的,这是我到目前为止 - 我猜测逗号是OR,'和'显然是AND.它是否正确?我正在努力制作更多通用的查询,而不仅仅是针对iPhone/iPad ......
@media
only screen and (max-device-width : 721px) and (orientation : portrait) and (-webkit-min-device-pixel-ratio: 1.5),
only screen and (max-device-width : 721px) and (orientation : portrait) and (min-device-pixel-ratio: 1.5),
only screen and (max-width: 359px) {
/* All Portrait Phones */
}
@media …Run Code Online (Sandbox Code Playgroud) 我有一个图像,css"float"设置为"left",在"div"元素内.即使位置是相对的,图像也不会强制div的高度增加,因此图像突出于div的底部.我怎样才能解决这个问题?
我有一个表单域:
<input type="text" value="" name="Email" id="Email">
我的表单操作确认网址是这样的:
http://.../index.php?Email=<?php echo $_POST['Email']; ?>
但是提交后,电子邮件参数没有通过。这是可以在 PHP 中完成的事情,还是仅在初始页面加载时读取该字段?
谢谢
在我的应用程序中,我们将通过向他们发送电子邮件来获得用户的反馈.因此,如果用户填写字段并提交,那么我将其存储在我的数据库中.
我准备了一个看起来像这样的html邮件.

但问题是我无法在邮件中显示评级星.这需要内联css但我无法将该CSS放入内联,因为它包括onhover css.
那么有没有办法通过电子邮件发送评级.
是否有任何方法可以在onhover内联css提前谢谢你.
我正在整理一个搜索引擎在php中循环一些目录和回声过滤结果.
我的问题是,在所有搜索完成之前不会执行回显,导致页面保持空白,直到脚本完成.
这是正常的吗?如果是这样,我怎样才能在调用回声时显示搜索结果?
我也将最终将结果中的图像写入屏幕.可以通过同时利用客户端和服务器端来调用JS document.write函数来代替回应所有内容吗?
编辑:这是迭代的代码.我有一个标记系统,但此部分已被注释掉了...
function checkTags($dir, $search){
global $tag;
$filesInDir = array_map('strtolower', scandir($dir)); // lower case the files
$filterOut = array('.','..');
$filesInDir = array_diff($filesInDir, $filterOut); // get rid of the current '.' and parent '..' values
// print_r($filesInDir);
foreach($filesInDir as $file) {
if($file == $tag) { // found a tag
echo 'found tag: '.$file.'<br>';
/* $tagDir = dirname($tag);
$tagContents = strtolower(file_get_contents($file).'<br>'.$tagDir); // adding full path to include parent dirs in tag searching
foreach($search as $s){
if(strpos($tagContents, $s) …Run Code Online (Sandbox Code Playgroud)