8000 解决在 Windows 上还有部分文件乱码的问题 by iakuf · Pull Request #3 · gxlmyacc/sciter-doc-zh · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

解决在 Windows 上还有部分文件乱码的问题 #3

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion content/api/window.htm
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<html>
<html>
<head>
</head>
<body>
Expand Down
2 changes: 1 addition & 1 deletion content/behaviors/scrollbar.htm
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<html>
<html>
<head>
<meta name="generator" content="h-smile:richtext"/>
</head>
Expand Down
2 changes: 1 addition & 1 deletion content/css/css-media-queries.htm
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<html>
<html>
<head>
<title>H-SMILE中的媒体查询</title>
<meta name="generator" content="h-smile:richtext"/>
Expand Down
2 changes: 1 addition & 1 deletion content/css/css-transition-sciter.htm
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<html>
<html>
<head>
<title>CSS属性 - transition</title>
</head>
Expand Down
2 changes: 1 addition & 1 deletion content/preface.htm
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<html>
<html>
<head>
<meta name="generator" content="behavior:richtext"/>
</head>
Expand Down
2 changes: 1 addition & 1 deletion content/sciter/Transact.htm
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<html>
<html>
<head>
<meta name="generator" content="h-smile:richtext"/>
</head>
Expand Down
2 changes: 1 addition & 1 deletion content/script/Date.htm
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<html>
<html>
<head>
<title>Date对象</title>
<meta name="generator" content="h-smile:richtext"/>
Expand Down
2 changes: 1 addition & 1 deletion content/script/Float.htm
1E0A
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<html>< F438 /td>
<html>
<head>
<title>Float(浮点)对象</title>
<meta name="generator" content="h-smile:richtext"/>
Expand Down
2 changes: 1 addition & 1 deletion content/script/Function.htm
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<html>
<html>
<head>
<title>TIScript - Function(函数)对象</title>
<meta name="generator" content="h-smile:richtext"/>
Expand Down
2 changes: 1 addition & 1 deletion content/script/Index.htm
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<html>
<html>
<head>
<title>Index(索引)对象</title>
<meta name="generator" content="h-smile:richtext"/>
Expand Down
2 changes: 1 addition & 1 deletion content/script/Integer.htm
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<html>
<html>
<head>
<title>Integer(整数)值</title>
<meta name="generator" content="h-smile:richtext"/>
Expand Down
2 changes: 1 addition & 1 deletion content/script/Math.htm
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<html>
<html>
<head>
<meta name="generator" content="h-smile:richtext"/>
</head>
Expand Down
2 changes: 1 addition & 1 deletion content/script/XMLScanner.htm
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<html>
<html>
<head>
<title>XMLScanner</title>
<meta name="generator" content="h-smile:richtext"/>
Expand Down
2 changes: 1 addition & 1 deletion content/script/language/Classes.htm
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<html>
<html>
<head>
<title>>TIScript 3.2操作指南——类和名称空间</title>
<link rel="stylesheet" href="for-screen.css"/>
Expand Down
2 changes: 1 addition & 1 deletion content/script/language/Decorators.htm
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<html>
<html>
<head>
<title>TIScript 3.2操作指南——类和名称空间</title>
<link rel="stylesheet" href="for-screen.css"/>
Expand Down
2 changes: 1 addition & 1 deletion content/script/language/Functions.htm
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<html>
<html>
<head>
<title>TIScript 3.2操作指南——函数</title>
<link rel="stylesheet" href="for-screen.css"/>
Expand Down
2 changes: 1 addition & 1 deletion content/script/language/for-screen.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@


input#show-defintions
{
value-changed!: $1(body).hide-defintions = self:value ? null # true;
Expand Down
127 changes: 64 additions & 63 deletions core/Better-CSS-sprites.htm
Original file line number Diff line number Diff line change
@@ -1,93 +1,94 @@
<html>

<head>
<title>更好的CSS精灵</title>
</head>

<body>
<html>

<head>

<title>更好的CSS精灵</title>
</head>

<body>
<div class="post" id="post-41679">

<h1 class="storytitle">更好的CSS精灵</h1>
</div>


<div class="storycontent">
<p>首先我要承认,目前的做法<a href="http://coding.smashingmagazine.com/2009/04/27/the-mystery-of-css-sprites-techniques-tools-and-tutorials/">CSS精灵</a>的做法类似于一个黑客。</p>

<p>首先我要承认,目前的做法<a href="http://coding.smashingmagazine.com/2009/04/27/the-mystery-of-css-sprites-techniques-tools-and-tutorials/">CSS精灵</a>的做法类似于一个黑客。</p>

<p>好吧, CSS精灵是什么? (准确的说,<em>精灵</em>一词对于实体来说是一个错误的名称,不过谁让它已经广泛传播了呢,那我也只能无奈接受了)</p>
<p>好吧, CSS精灵是什么? (准确的说,<em>精灵</em>一词对于实体来说是一个错误的名称,不过谁让它已经广泛传播了呢,那我也只能无奈接受了)</p>

<p>这里的'精灵'其实是一些基本图像的部分片段。这个图像只加载一次,但是它的'片段'被当做一张完整的图片用在各个位置上。</p>
<p>这里的'精灵'其实是一些基本图像的部分片段。这个图像只加载一次,但是它的'片段'被当做一张完整的图片用在各个位置上。</p>

<p>这是演示了如果使用标准CSS来实现'精灵'。这里取工具条作为一个典型示例 &#8211; 工具条上有一系列按钮,并且每个按钮都有它自己的图标。</p>
<p>这是演示了如果使用标准CSS来实现'精灵'。这里取工具条作为一个典型示例 &#8211; 工具条上有一系列按钮,并且每个按钮都有它自己的图标。</p>

<p>首先,我们需要为所有的按钮定义通用的样式: </p>
<pre class="brush: css;">
.toolbar li a { width: 25px; height: 25px; display: block; background:no-repeat url(tb-icons.png); }
<pre class="brush: css;">
.toolbar li a { width: 25px; height: 25px; display: block; background:no-repeat url(tb-icons.png); }
</pre>
<p>然后,为每个按钮的背景图像定义负偏移值,以便图像的某部分滚动到当前元素的&#8220;视图&#8221;上。像下面这样: </p>
<pre class="brush: css;">
.toolbar li a.btn-formatting { background-position: -25px 0; }
.toolbar li a.btn-bold { background-position: -50px 0; }
.toolbar li a.btn-italic { background-position: -75px 0; }
.toolbar li a.btn-font-size { background-position: -125px 0; }
<pre class="brush: css;">
.toolbar li a.btn-formatting { background-position: -25px 0; }
.toolbar li a.btn-bold { background-position: -50px 0; }
.toolbar li a.btn-italic { background-position: -75px 0; }
.toolbar li a.btn-font-size { background-position: -125px 0; }
</pre>
<p>因为按钮的&#8220;font-size&#8221;的图像位置是负值,所以渲染的结果如下:<br />

<a href="images/css-sprites.png">
<img src="images/css-sprites.png" alt="" title="css-sprites" width="246" height="45" class="aligncenter size-full wp-image-41680" />
</a></p>

<p>到目前为止这工作地很好。</p>
<a href="images/css-sprites.png">
<img src="images/css-sprites.png" alt="" title="css-sprites" width="246" height="45" class="aligncenter size-full wp-image-41680" />
</a></p>

<p>不过现在设想一下,你的一个'土豪'用户有一个225 DPI的屏幕,这时你需要给他/她一个更大的图标以便有更好的体验。 专为96dpi设计的图像在225dpi的浏览器上看起来缩放的很厉害。</p>
<p>到目前为止这工作地很好。</p>

<p>不过现在设想一下,你的一个'土豪'用户有一个225 DPI的屏幕,这时你需要给他/她一个更大的图标以便有更好的体验。 专为96dpi设计的图像在225dpi的浏览器上看起来缩放的很厉害。</p>

<p>所以,你最终需要设置一个新的样式集: </p>
<pre class="brush: css;">
media ... {
.toolbar li a { width: 25px; height: 25px; display: block; background:no-repeat url(tb-icons-x2.png); }
.toolbar li a.btn-formatting { background-position: -41px 0; }
.toolbar li a.btn-bold { background-position: -96px 0; }
.toolbar li a.btn-italic { background-position: -143px 0; }
.toolbar li a.btn-font-size { background-position: -246px 0; }
}
<pre class="brush: css;">
media ... {
.toolbar li a { width: 25px; height: 25px; display: block; background:no-repeat url(tb-icons-x2.png); }
.toolbar li a.btn-formatting { background-position: -41px 0; }
.toolbar li a.btn-bold { background-position: -96px 0; }
.toolbar li a.btn-italic { background-position: -143px 0; }
.toolbar li a.btn-font-size { background-position: -246px 0; }
}
</pre>
<p>上面所说的这种做法不是很好的管理方式 &#8211; 每次你都需要重新计算图像的位置。 这种功能很贫乏的精灵方式还有许多其他问题。例如,你无法将图像定位到按钮的中间,每个图像的尺寸都必须完全精确的。</p>
<p>上面所说的这种做法不是很好的管理方式 &#8211; 每次你都需要重新计算图像的位置。 这种功能很贫乏的精灵方式还有许多其他问题。例如,你无法将图像定位到按钮的中间,每个图像的尺寸都必须完全精确的。</p>

<p>所以,我决定在Sciter中提供一种更好的图像编目机制,这里引入了<code>@image-map</code>的 at-规则 和<code>image-map()</code> 函数。下面延时如果使用这种新方式来声明工具条。</p>
<p>所以,我决定在Sciter中提供一种更好的图像编目机制,这里引入了<code>@image-map</code>的 at-规则 和<code>image-map()</code> 函数。下面延时如果使用这种新方式来声明工具条。</p>

<p>首先,定义我们的图像映射声明:</p>
<pre class="brush: css;">
@image-map tb-icons
{
/* 我们在下面的单一逻辑实体中定义3张图片 */
src: url(tb-icons.png) 120dpi, /* &lt;= 120dpi */
url(tb-icons-x2.png) 240dpi, /* &lt;= 240dpi */
url(tb-icons-jumbo.png); /* 其他 */
cells: 15 2; /* 图片中有15列, 2 行 */
/* 图片中某部分的逻辑名称,参见tb-icons.png */
items: bold, italic, underline, strike,
font-family, font-size, text-color, text-back-color;
}

<pre class="brush: css;">
@image-map tb-icons
{
/* 我们在下面的单一逻辑实体中定义3张图片 */
src: url(tb-icons.png) 120dpi, /* &lt;= 120dpi */
url(tb-icons-x2.png) 240dpi, /* &lt;= 240dpi */
url(tb-icons-jumbo.png); /* 其他 */

cells: 15 2; /* 图片中有15列, 2 行 */

/* 图片中某部分的逻辑名称,参见tb-icons.png */
items: bold, italic, underline, strike,
font-family, font-size, text-color, text-back-color;
}
</pre>
<p>这里演示如何使用上面的声明:</p>
<pre class="brush: css;">
.toolbar > button {
size:2em;
background:no-repeat 50% 50%; padding:3px; /* 注意 - 居中对齐 */
}
<pre class="brush: css;">
.toolbar > button {
size:2em;
background:no-repeat 50% 50%; padding:3px; /* 注意 - 居中对齐 */
}
</pre>
<p>接下来就可以通过它们的逻辑名称来将它们当做普通图像使用了:</p>
<pre class="brush: css;">
.toolbar > button.bold { background-image:image-map(tb-icons,bold); }
.toolbar > button.italic { background-image:image-map(tb-icons,italic); }
.toolbar > button.underline { background-image:image-map(tb-icons,underline); }
.toolbar > button.strike { background-image:image-map(tb-icons,strike); }
<pre class="brush: css;">
.toolbar > button.bold { background-image:image-map(tb-icons,bold); }
.toolbar > button.italic { background-image:image-map(tb-icons,italic); }
.toolbar > button.underline { background-image:image-map(tb-icons,underline); }
.toolbar > button.strike { background-image:image-map(tb-icons,strike); }
</pre>
<p>注意:当你需要支持其他分辨率时,你无需重新设计你的CSS设计,只需修改下 @image-map 的声明。</p>
<p>注意:当你需要支持其他分辨率时,你无需重新设计你的CSS设计,只需修改下 @image-map 的声明。</p>

<p>这里是半正式的<a href='http://www.terrainformatica.com/wp-content/uploads/2012/11/image-map.htm'>image-map feature</a>规范。</p>
</div>
Expand Down
40 changes: 21 additions & 19 deletions core/Caret-positions-in-HTML.htm
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
<html>

<head>
<title>HTML中的插入位置</title>
</head>

<body>
<html>

<head>

<title>HTML中的插入位置</title>
</head>

<body>
<div class="post" id="post-41652">
<h1 class="storytitle">HTML中的插入位置</h1>
</div>
Expand All @@ -16,7 +17,8 @@ <h1 class="storytitle">HTML中的插入位置</h1>
不过在Sciter2中,新的<code>behavior:richtext</code>行为使用标准的DOM模型,它的HTML内容为: element:node, text:node, comment:node。<br />
这个变化导致我需要重新思考插入位置的概念。</p>
<p> 考虑下面的标记代码:</p>
<pre class="brush: html">&lt;p&gt;12&lt;b&gt;34&lt;/b&gt;&lt;i&gt;56&lt;/i&gt;&lt;/p&gt;</pre>
<pre class="brush: html">&lt;p&gt;12&lt;b&gt;34&lt;/b&gt;&lt;i&gt;56&lt;/i&gt;&lt;/p&gt;
</pre>
<p>它的渲染结果如下: </p>
<p>12<b>34</b><i>56</i></p>
<p>问题来了: 在这个段落中有多少个插入位置?</p>
Expand All @@ -36,19 +38,19 @@ <h1 class="storytitle">HTML中的插入位置</h1>
</ul>
<p>这种处理方式覆盖了上面的问题#1和#2,但是问题#3依然没有覆盖。所以还需要想想办法。</p>
<p>其实这个问题不仅仅是字符内部和跨文本才会出现,下面的这种情况也类似:</p>
<pre class="brush: html">&lt;ul&gt;
&lt;li&gt;一&lt;/li&gt;
&lt;li&gt;二&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;一些代码&lt;/pre&gt;
<pre class="brush: html">&lt;ul&gt;
&lt;li&gt;一&lt;/li&gt;
&lt;li&gt;二&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;一些代码&lt;/pre&gt;
</pre>
<p>这种情况下,如果你需要在列表的文本和&lt;pre&gt;块之间插入段落,你会怎么做:</p>
<pre class="brush: html">&lt;ul&gt;
&lt;li&gt;一&lt;/li&gt;
&lt;li&gt;二&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;一些文本&lt;/p&gt;
&lt;pre&gt;一些代码&lt;/pre&gt;
<pre class="brush: html">&lt;ul&gt;
&lt;li&gt;一&lt;/li&gt;
&lt;li&gt;二&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;一些文本&lt;/p&gt;
&lt;pre&gt;一些代码&lt;/pre&gt;
</pre>
<p>你可以在你的浏览器中试一下:</p>
<div style="background:#EEE; border:1px dotted black" contenteditable>
Expand Down
25 changes: 13 additions & 12 deletions core/DOM-Inspector-how-remove-border-from-input.htm
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
<html>

<head>
<title>DOM检视器(Inspector), 如果移除输入元素的边框</title>
</head>

<body>
<html>

<head>

<title>DOM检视器(Inspector), 如果移除输入元素的边框</title>
</head>

<body>
<div class="post" id="post-41898">
<h1 class="storytitle">DOM检视器(Inspector), 如果移除输入元素的边框</h1>
</div>
Expand All @@ -23,11 +24,11 @@ <h1 class="storytitle">DOM检视器(Inspector), 如果移除输入元素的边
<p><code>theme:....</code>是一种虚拟图像 &#8211; 它们的渲染委托给了宿主操作系统的UI主题服务。因此&lt;input>元素的边框是由宿主操作系统绘制的。</p>
<p>最后,这里给出“怎么移除输入元素的边框”的答案。</p>
<p>要抑制边框和任何背景的绘制,可以声明以下内容:</p>
<pre class="brush: css;">
input#my {
border: none; /* 移除任何边框 */
background: none; /* 移除任何(默认)背景 */
}
<pre class="brush: css;">
input#my {
border: none; /* 移除任何边框 */
background: none; /* 移除任何(默认)背景 */
}
</pre>
</div>

Expand Down
2 changes: 1 addition & 1 deletion core/Drag-and-Drop.htm
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<html>
<html>
<head>
<title>Sciter中的内建的拖拽操作(Drag&Drop)</title>
</head>
Expand Down
2 changes: 1 addition & 1 deletion core/Formation.htm
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="generator" content="h-smile:richtext" />
Expand Down
2 changes: 1 addition & 1 deletion core/Object-match-feature.htm
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<html>
<html>
<head>
<title>Sciter 3.2.0.3新增的对象匹配特性</title>
</head>
Expand Down
Loading
0