熱門文章

2016年7月12日 星期二

[Html]快速轉移到同頁面特定位置

How To Link to a Specific Spot on a Page

Want to give your website visitors a shortcut to a specific spot on a page? Or maybe add a link back to the top so they can get back to your navigation menu or any other area within the page? Targeting within a page is really easy and there's 2 ways to do this, here's how.

The XHTML Compliant Way to Link Within a Page

If you don't know what XHTML compliant means, don't worry it just means that it will help your pages validate as XHTML Strict, the old way won't pass. This method is just as easy as the older link jump and when you continue getting better at designing you will probably be glad you did it this way in the first place (no messy editing later).
1) Name the Target
Choose the exact spot you want to send your link to, choose and element near it (a div, header tag, paragraph.. whatever as long as it's in the right spot), add id="something", you can call them anything you like as long as the names are the same in the link and the target ID and preferably no spaces (spaces change to %20 in the address bar and look a tad messy).
An example would look like this:
<div id="whatever-you-want-to-call-it">
The content of your div here.
</div>
2) Link To Your Anchor Target
To link to your anchor simply use:
<a href="#whatever-you-want-to-call-it">Link Text Here</a>
or if it's on another page:
<a href="pagename.html#whatever-you-want-to-call-it">Link Text Here</a>

The Old Way

This way of jumping to a spot within a page is not as good an idea for a few reasons. The "name" attribute has been depreciated for XHTML, and using tags you already have on your page like <h1>, <p> or any other places you can add id's will leave you less clutter on your page. (ie, you can use them for css styles, javascript and a lot more. And yup, if you happen to already have a something styled on your page using ID, linking to it works just fine.)
With that said, just in case for some reason you want to try the other way, here it is. As with the linking method above, you can call it anything you'd like, try not to use spaces though (they look rather messy in an address bar).
1) Naming the Target
Choose a spot on the page you want to link to and make an anchor by making a link mostly as usual but instead of "href" add "name" inside it. 
Here's an example:
<a name="whatever-you-want-to-call-it">something here so you don't have an empty tag</a>
2) Linking to your new jump spot
This step is the same as above:
<a href="#whatever-you-want-to-call-it">Link Text Here</a>
See, either way you choose to link within the page it's fast, easy and can be very helpful to your visitors.

2016年7月10日 星期日

深夜加油站遇見蘇格拉底

帶給我們快樂的,是旅程,不是終點。 "The journey is what brings us happinessnot the destination. " 深夜加油站遇見蘇格拉底(Peaceful Warrior)

低成本自製降室溫

http://techfeed.today/2016/07/07/孟加拉人民發明了不耗電的空調-真的好用嗎?/

最近,一家孟加拉公司The GreyGroup發明了一款厚紙板組成的生態空調,並且大家還能親自動手做一個~

首先,找一些舊的塑膠瓶(瓶身和瓶頸大小相差越多,最後製冷效果越好喲),去掉瓶蓋,把塑膠瓶剪成兩半,

把上半部分插到剪好一個個小洞的紙板上,並固定好位置~

然後,把紙板放到窗口,注意~瓶頸要朝向室內。

完成!就是這麼簡單~它的原理是:熱氣流進入瓶子較寬的部分,然後經過窄窄的瓶頸時,壓力發生變化,氣流在進入室內之前就會被冷卻了。你可以用嘴巴呼氣與吹氣來驗證這個原理,出來的空氣溫度是不是不一樣?

這個自製的製冷系統製作簡單, 能在短時間內,讓室溫降低至少5度,並且它不需要任何電力!

2016年7月6日 星期三

openshift avada主題

avada主題 提供 Fusion Builder
卻發生無法使用builder的情況發生
搜尋之後,是因為  WP_MEMORY_LIMIT 的不足(該主題可以看 



WP Memory Limit:[?]40 MB - We recommend setting memory to at least 128MB
To import classic demo data, 256MB of memory limit is required. 
Please define memory limit in wp-config.php file. To learn how, see: Increasing memory allocated to PHP.

更改 wp-config.php 發現無法增加(可能是因為openshit的限制) ,搜尋

Stack Overflow 

發現有人遇到同樣的問題,所以更加確認是openshift的限制

後來往下看 system status 還有一個紅字
PHP Max Input Vars 1000   (建議3000)

後來更改這裡後就可以使用builder了

lightroom 修編技巧

http://digiphoto.techbang.com/posts/8852-adobe-lightroom-15-keys-to-cheat?page=2

2016年7月5日 星期二

[英文]各種帽子的英文

http://learningdiary.net/毛帽及各類帽子的英文名稱/

 beanie1. beanie (hat)
baseball hat 2. (baseball) cap
hat chocolate in the snow castle castle
3. faux fur hat (人造皮帽)
* Why faux? faux : not real (假的)
這張照片的地點在芬蘭的冰宮,所以冷到一定要帶皮帽。
即使是人造的,還是保暖度百分百! No fur please.
felt hat4. felt hat = fedora (淺頂軟呢帽)* 這種帽子長的有點像皺皺的皇冠。
straw hat5. straw hat / sun hat它的帽緣是平的。
asos_leopard_print_headband
6. headband 頭帶 (不得不說這要看人戴)

2016年6月30日 星期四

[澳洲料理]清燉牛肉湯

十元出好料,清燉牛肉湯5人份
材料:
澳洲價格
牛骨 4/kg
紅蘿蔔1,2根 c20
洋蔥1,2顆 c40
辣椒/乾辣椒 2根 c20
蔥1根
蒜頭5,6顆(一半的大顆)
薑 2片
花椒 1茶匙
黑胡椒粒 1茶匙
鹽 1~2 tea spoon
醬油 1~2 tea spoon

作法:
先川燙牛骨2~3回,去除上面的血(建議選擇無脊椎骨的,因為血不容易去除)

將香料(辣椒,花椒,胡椒粒。。。等不會食用的材料)放入香料袋(我是用茶包袋代替)沒有也無所謂只是吃的時候容易咬到花椒,影響口感。

大鍋加入2~2.5L的水,再放入骨頭,香料,蔥,醬油,鹽,蒜,薑。水滾後關至小火。1小時後,撈出上層雜質,然後視水量補充少許,並加入洋蔥,紅蘿蔔繼續小火滾半小時即可。

此時骨頭味道,尚未完全煮出來,但是也蠻好喝了。若想再入味點,只需關火再悶個2小時即可。

照片這次煮的因為有脊椎骨,導致血水過多,湯偏渾濁,且牛味較重,所以買骨頭時要稍微挑選一下。

ps. 骨頭的價格因店而異,便宜的
Butcher shop 有買過2/kg的。