Prism
感覺可以選的樣式就那幾種啊…
highlight.js
Syntaxhighlight.in
https://github.com/thierryk/Syntaxhighlight.in
這一個感覺不是很好用,用一下就放棄了
Prism
感覺可以選的樣式就那幾種啊…
highlight.js
Syntaxhighlight.in
https://github.com/thierryk/Syntaxhighlight.in
這一個感覺不是很好用,用一下就放棄了
CSS讀不到:
記得把Any XHR勾掉
【防止frame嵌套】
if (top.location != self.location) {
top.location = self.location;
}
var str = document.URL;
str = str.toLowerCase();
js如何判斷是否在iframe中及防止網頁被別站用 iframe嵌套
【設定網頁為no-cache】
response.setHeader(“pragma”, “no-cache”);
response.setHeader(“cache-control”, “no-cache”);
response.setDateHeader(“expires”, 0);
這個是outline…
button:focus{
outline: none;
}
$(window).scroll(function() {
$(“.slideanim”).each(function() {
var pos = $(this).offset().top;
//傳回此物件距離最上面的長度
var winTop = $(window).scrollTop();
// 偵測window的捲動值
if (pos < winTop + 600) {
//假設原距離top有1000,捲軸滑到距離它600px時就會滑出來
$(this).addClass(“paraslide”);
}
});
});
.slideanim { visibility: hidden; }
.paraslide { /* The name of the animation */ animation-name: slide; -webkit-animation-name: slide; /* The duration of the animation */ animation-duration: 1s; -webkit-animation-duration: 1s; /* Make the element visible */ visibility: visible; }
/* Go from 0% to 100% opacity (see-through) and specify the percentage from when to slide in the element along the Y-axis */ @keyframes slide { 0% { opacity: 0; -webkit-transform: translateY(70%); } 100% { opacity: 1; -webkit-transform: translateY(0%); } } @-webkit-keyframes slide { 0% { opacity: 0; -webkit-transform: translateY(70%); } 100% { opacity: 1; -webkit-transform: translateY(0%); } }
網路上雖然已經有很多教學了,但是自己實作再記一次筆記,看自己的筆記比較好懂,就來寫一下囉。
※RUBY記得要是最新的版本
若gulp無效顯示:
‘gulp’ is not recognized as an internal or external command,
operable program or batch file.
,試試:npm install -g gulp-cli
※記得compass、compass create 要先裝好再執行gulp的watch
Gulp doesn’t work
https://stackoverflow.com/questions/26827560/gulp-doesnt-work
↑安裝有問題參考這篇
步驟
首先輸入指令安裝gulp
然後安裝compass
npm init
呵呵 安裝gulp-compass
記得在根目錄自己建一個gulpfile.js檔
然後貼上其它網站複製來的文字(欸
在cmd上打gulp … 有跑就有救了!
然後難的開始了
發現bug了 崩潰崩潰
輸入compass create 安裝一些compass要的檔案
Congratulations! Your compass project has been created.
You may now add and edit sass stylesheets in the sass subdirectory of your project.
Sass files beginning with an underscore are called partials and won’t be
compiled to CSS, but they can be imported into other sass stylesheets.
You can configure your project by editing the config.rb configuration file.
You must compile your sass stylesheets into CSS when they change.
This can be done in one of the following ways:
1. To compile on demand:
compass compile [path/to/project]
2. To monitor your project for changes and automatically recompile:
compass watch [path/to/project]
More Resources:
* Website: http://compass-style.org/
* Sass: http://sass-lang.com
* Community: http://groups.google.com/group/compass-users/
To import your new stylesheets add the following lines of HTML (or equivalent) to your webpage:
<head>
<link href=”/stylesheets/screen.css” media=”screen, projection” rel=”stylesheet” type=”text/css” />
<link href=”/stylesheets/print.css” media=”print” rel=”stylesheet” type=”text/css” />
<!–[if IE]>
<link href=”/stylesheets/ie.css” media=”screen, projection” rel=”stylesheet” type=”text/css” />
<![endif]–>
</head>
再改一下資料夾的路徑
跳出好多訊息啊…然後我再打gulp試試
後來就開始watch了?
按Ctrl + C 跳出提示要不要停止的訊息。
結果都可以用了,爽爽der,高潮惹
靠妖啦,結果發現我的watch在存檔之後根本沒動靜
回頭來改了一下我的gulpfile.js
參考這一篇寫出來的
結果萬歲終於可以用了
QQ我真的被它搞死了幹