2012年2月6日

困扰多时的文章发布器WWW后台与3G后台同步异常的问题,通过各种测试操作让“隐形”问题重新,终于得以解决。

问题描述:

在WWW发布器栏目中没有上页面的稿件,却出现在了3G后台里,因为文章标题没有经过任何处理,常是长标题。

问题分析:

在WWW后台权重为60的文章,却在对应的3G后台权重被修改为76,WWW后台以及3G后台的编辑均表示没有在3G后台做过权重的修改,让问题重现比较困难。

通过查询该篇文章的操作记录发现,文章曾经被推动到另外两个栏目A和B,并在A栏目里权重被修改为76,在B栏目里权重被修改为79。由此判断是某一操作导致同步到3G后台的权重发生变化,但3G的发布器服务器日志对权重修改的动作无记录,只能通过测试操作尝试让问题重新。

问题重现:

【WWW后台】
测试栏目A 00254PU3
测试栏目B 00254PU4

【3G后台】
test同步测试 002507U7
对应的WWW后台是测试栏目A 00254PU3

1.在测试栏目A里发一篇文章,同时推送到测试栏目B;
2.在测试栏目B列表页对那篇文章进行快速修改权重成79,这时候3G后台的test同步测试的那篇文章权重不变;
3.在测试栏目B进入那篇文章的编辑界面,在内文修改权重再发布, 这个时候测试A栏目对应的3G后台的该篇文章的权重就跟着变成78了。

结论:

3G后台权重变化是由编辑在推送目标栏目后,并在内文修改文章权重时产生。

解决方案:

1.改变操作流程,只允许在列表页快速修改权重,禁止在内文修改界面修改权重。

2.改变后台同步逻辑。

posted @ 2012-02-06 19:59 eecc 阅读(56) 评论(0) 编辑

2011年10月31日

完整HACK代码:

select {
background-color
:cccccc\0;/* ie 8/9*/
background-color
:eeeeee\9\0;/* ie 9*/
*background-color
:#dddd00;/* ie 7*/
_background-color
:#CDCDCD;/* ie 6*/
}

其中:
background-color:cccccc\0;IE8和IE9都支持;
background-color:eeeeee\9\0; 仅IE9支持;

另外,background-color:eeeeee\9;的HACK支持IE6-IE8,但是IE8不能识别“*”和“_”的CSS HACK。

可综合上述规律灵活应用。


 

posted @ 2011-10-31 03:21 eecc 阅读(1566) 评论(9) 编辑

2011年10月26日

利用<a>标签的a:hover状态触发鼠标移过的动作,其中未触发状态显示为单个图片。兼容IE6/7/8以及FF/Chrome等主流浏览器。以下是图示及完整代码。

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="zh-CN">
<head>
<title>对话商业领袖_网易财经</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<meta http-equiv="Content-Language" content="zh-CN" />
<meta content="all" name="robots" />
<meta name="author" content="Netease" />
<meta name="Copyright" content="Netease" />
<meta name="keywords" content="" />
<base target="_blank" />
<style>
*
{margin:0px;padding:0px;}
body
{ text-align:left; font-size:12px;}
ul.onMShow
{width: 110px;}
ul.onMShow li
{list-style:none; background-position:left top; background-repeat:no-repeat;}
ul.onMShow li a
{position: relative;display:block; width:200px; height:50px;border:none; }
ul.onMShow li a div
{display: none;}
ul.onMShow li a:hover
{background::none;display:block; width:auto;}/*此处需定义宽度,否则IE6下无法正常显示*/
ul.onMShow li a:hover div
{display:block;position: absolute;padding:5px;width: 272px;left:0px;top: 0px;border: 1px solid #BDBDBD;background-color: #E4F6FF;cursor:pointer;}
ul.onMShow li a img
{width:80px;height:80px;border:none;display:block;position: absolute;top:5px;left:5px;}
ul.onMShow li dl
{width:180px;float:right;color: #000;line-height:20px;}
ul.onMShow li dl dd span
{font-weight: bold;color: #000; margin-right:5px;}
ul.onMShow li dl dd h5
{ font-size:12px; color:#979797; display:inline; font-weight:normal;}
</style>
</head>
<body>
<ul class="onMShow">
<li style="background-image:url(http://img4.cache.netease.com/stock/2009/9/5/2009090523262247607.png)"><a href="http://money.163.com/09/0703/18/5DALA0IV002526O5.html"><br /><div><img src="http://img3.cache.netease.com/stock/2009/9/5/2009090523262766842.png" alt="常德传" />
<dl>
<dd><span>常德传</span><h5>青岛港集团董事局主席</h5></dd>
<dd>在困难的时候企业就是要手拉手,肩并肩,不能想单打独斗,抱团合作是唯一出路。</dd>
</dl></div></a></li>
</ul>
</body>
</html>
posted @ 2011-10-26 17:23 eecc 阅读(1491) 评论(5) 编辑

2011年10月25日

理念:

1. reset 的目的不是清除浏览器的默认样式,这仅是部分工作。清除和重置是紧密不可分的。

2. reset 的目的不是让默认样式在所有浏览器下一致,而是减少默认样式有可能出现的问题。

3. reset 期望提供一套普适通用的基础样式。推荐根据具体需求,裁剪和修改后再使用。

特色:

1. 适应中文;

2. 基于最新主流浏览器。

/** 清除内外边距 **/
body, h1, h2, h3, h4, h5, h6, hr, p, blockquote,
/* structural elements 结构元素 */
dl, dt, dd, ul, ol, li,
/* list elements 列表元素 */
pre,
/* text formatting elements 文本格式元素 */
form, fieldset, legend, button, input, textarea,
/* form elements 表单元素 */
th, td
/* table elements 表格元素 */ {margin: 0;padding: 0;}

/** 设置默认字体 **/
body, button, input, select, textarea
/* for ie */ {font: 12px/1.5 tahoma, arial, simsun, sans-serif;}
h1, h2, h3, h4, h5, h6
{font-size: 100%;}
address, cite, dfn, em, var
{ font-style: normal; } /* 将斜体扶正 */
code, kbd, pre, samp
{ font-family: courier new, courier, monospace; } /* 统一等宽字体 */
small
{ font-size: 12px; } /* 小于 12px 的中文很难阅读,让 small 正常化 */

/** 重置列表元素 **/
ul, ol
{ list-style: none; }

/** 重置文本格式元素 **/
a
{ text-decoration: none; }
a:hover
{color:#ff6600;}
sup
{ vertical-align: text-top; } /* 重置,减少对行高的影响 */
sub
{ vertical-align: text-bottom; }

/** 重置表单元素 **/
legend
{ color: #000; } /* for ie6 */
fieldset, img
{ border: 0; } /* img 搭车:让链接里的 img 无边框 */
button, input, select, textarea
{ font-size: 100%; } /* 使得表单元素在 ie 下能继承字体大小 */
/* 注:optgroup 无法扶正 */

/** 重置表格元素 **/
table
{ border-collapse: collapse; border-spacing: 0; }
body
{width:990px;margin:0 auto;text-align:center;}
img
{vertical-align:top;}
.clearing
{clear:both;height:0;visibility:hidden;display:block;overflow:hidden;}
posted @ 2011-10-25 00:11 eecc 阅读(1331) 评论(3) 编辑

2011年10月23日

浮动元素由于脱离了文档流,无法撑起其父元素的高度,如果父元素要显示背景或边框时就不能置之不理了。使浮动元素的父容器自适应高度的方法有三种:

方法一:让浮动元素后面紧跟一个用于清除浮动的空标签。完整代码:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>clearfix</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<meta http-equiv="Content-Language" content="zh-CN" />
<style type="text/css">
.area
{background:#ccc;}/*定义父容器背景颜色,以便于观察*/
.fl
{float:left;background:#FFDF00;}
.cb
{clear:both;}
</style>
</head>
<body>
<div class="area">
<div class="fl">floater</div>
<div class="cb"></div>
</div>
</body>
</html>

缺点:增加了一个空标签,破坏了语义化。

方法二:给父容器加上一个特殊的class,直接从父容器清除浮动元素的浮动。完整代码:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>clearfix</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<meta http-equiv="Content-Language" content="zh-CN" />
<style type="text/css">
.area
{background:#ccc;}/*定义父容器背景颜色,以便于观察;定义宽度,使其在IE下高度自适应*/
.clearfix:after
{height:0px;visibility:hidden;content:".";clear:both;display:block;}
.fl
{float:left;background:#FFDF00;}
.clearfix
{display:inline-block;}/* 对Mac上的IE浏览器进行的处理 */
* html .clearfix
{height:1%}/* 对win上的IE浏览器进行的处理 */
.clearfix
{display:block;}/* 对display: inline-block;进行的修改,重置为区块元素*/
</style>
</head>
<body>
<div class="area clearfix">
<div class="fl">floater</div>
</div>
</body>
</html>

方法三:在方法二的基础上进行改进。完整代码:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>clearfix</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<meta http-equiv="Content-Language" content="zh-CN" />
<style type="text/css">
.area
{background:#ccc;width:960px;}/*定义父容器背景颜色,以便于观察;定义宽度,使其在IE下高度自适应*/
.clearfix:after
{height:0px;visibility:hidden;content:".";clear:both;display:block;}
.fl
{float:left;background:#FFDF00;}
</style>
</head>
<body>
<div class="area clearfix">
<div class="fl">floater</div>
</div>
</body>
</html>
posted @ 2011-10-23 13:02 eecc 阅读(1064) 评论(5) 编辑

2008年8月7日

摘要: 如果不用ref传递的是原引用变量的副本,即把原来的引用变量复制一分传递给方法; 如果用ref传递的是原引用变量的引用。 class a { int val; } class test { public static void Main() { a a1=new a(); changeIt(a1); ...阅读全文
posted @ 2008-08-07 15:28 eecc 阅读(231) 评论(0) 编辑

2008年7月29日

摘要: Default.aspx全部代码:Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--><%@PageLanguage="C#"AutoEventWireup="true"%><!DOCTYPEhtmlPUBLIC"-//W3C//DTDXHTML1.1//EN""http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"阅读全文
posted @ 2008-07-29 10:54 eecc 阅读(3258) 评论(4) 编辑

2008年5月5日

摘要: 说的通俗一些,就是: 有一个叫做EventHandler 的家伙,他会告诉你(主程序),有一些事情发生了:这个事情是谁导致的呢?是某个object类型对象导致的,它用Source或Sender来表示。这个事情是什么事呢?e的内容就是事情的内容了。 至于Source和Sender,没有区别,你想用哪个就用哪个,其实都是一样的。 所以,我们在程序中的事件处理函数就是依赖于这个东西实现的:比方说你点了一个按钮,程序怎么知道应该用哪个函数来处理这个动作呢?那么EventHandler 这个家伙会告诉程序:"button1(sender)被点击(e)了,请调用对应的处理函数"。当然这阅读全文
posted @ 2008-05-05 13:50 eecc 阅读(2185) 评论(4) 编辑
仅列出标题  下一页

导航