7. 圖片

舉例說明,加入一張圖片:



css code:



Picture

雙圖互調

簡單的方式讓滑鼠移過去之後顯示另一張圖。首先加入元件如下:

在同一個div內放置兩個圖(利用圖形處理軟體讓其大小相同),然後加入css code如下:



顯示如下:



做法是先讓div的長寬固定。兩圖最大長寬皆設為100%,符合div的大小。 讓i1的position: absolute;並將i1的opacity設為1,hover時設為0,就會看到其下的i2。 以下解釋postion及transition。

position

position參數是定義位置,有以下幾種:

transition

transition是讓網頁在固定時間長度平緩的進行改變,語法是
transition: 性質 時間 速度 delay
可以只給性質時間或性質時間速度。之前的範例是改變opacity性質,在1s時間內,速度特性是ease-in-out。 再看以下例子:


Hover here

速度特性有以下選擇: 此外,使用transition-delay: 1s;指令表示要等待一秒才開始進行。

使用圖形作為背景

若要將圖形當作容器的背景,可以以下方式,請先找一張適合當作背景的圖。


這不是一個好範例,因為背景圖案太複雜

圖形的放置預設值為XY向重複填滿,其他的選擇為加上以下:
例如:

background-size: cover;
background-size: contain;

使用圖形當作border

使用圖形當作border首先須有一個適合做為border的圖形,可以分為像一個九宮格, 有四角四邊及中間部分,例如以下的圖形。

接著決定切片的數值,以及四邊要重複或拉伸,使用這個指令: border-image: url('./images/borderimage1.png') 30 stretch; stretch是拉伸,round是重複,之前的數值是切片位置,也可以使用百分比。
請看以下css code及其顯示結果:
佳節愉快!

看起來效果不怎麼好,再看以下例子:



This paper presents a study on routing problems associated with bridge inspection tasks. In the evaluatedproblems, a bridge inspection team must depart from the depot, visit bridges, and eventually return tothe depot. Since a single inspection team may require several days to perform this task, the inspectorsmust find lodging accommodations during the inspection period. This problem becomes a special type ofvehicle routing problem (VRP). Two types of scenarios are established for the bridge inspection problem. In the first scenario, only one inspection team is evaluated, and in the second scenario, more than oneinspection team and a specific inspection duration are assessed. The goal of this study is to determineoptimal routes and to find accommodations that minimize the total inspection cost, including the traveland lodging costs. The problem is solved using an ant colony optimization (ACO) algorithm. In addition, alocal search method is proposed for improving the quality of the solutions. Three benchmark datasets aregenerated to estimate the performance of the proposed method. First, a combination of the ACO parametervalues that yielded overall good results is determined, and subsequently the proposed method is appliedto the benchmarks. The results indicate that the proposed process yield promising solutions within areasonable time frame.


This paper presents a study on routing problems associated with bridge inspection tasks. In the evaluatedproblems, a bridge inspection team must depart from the depot, visit bridges, and eventually return tothe depot. Since a single inspection team may require several days to perform this task, the inspectorsmust find lodging accommodations during the inspection period. This problem becomes a special type ofvehicle routing problem (VRP). Two types of scenarios are established for the bridge inspection problem. In the first scenario, only one inspection team is evaluated, and in the second scenario, more than oneinspection team and a specific inspection duration are assessed. The goal of this study is to determineoptimal routes and to find accommodations that minimize the total inspection cost, including the traveland lodging costs. The problem is solved using an ant colony optimization (ACO) algorithm. In addition, alocal search method is proposed for improving the quality of the solutions. Three benchmark datasets aregenerated to estimate the performance of the proposed method. First, a combination of the ACO parametervalues that yielded overall good results is determined, and subsequently the proposed method is appliedto the benchmarks. The results indicate that the proposed process yield promising solutions within areasonable time frame.
This paper presents a study on routing problems associated with bridge inspection tasks. In the evaluatedproblems, a bridge inspection team must depart from the depot, visit bridges, and eventually return tothe depot. Since a single inspection team may require several days to perform this task, the inspectorsmust find lodging accommodations during the inspection period. This problem becomes a special type ofvehicle routing problem (VRP). Two types of scenarios are established for the bridge inspection problem. In the first scenario, only one inspection team is evaluated, and in the second scenario, more than oneinspection team and a specific inspection duration are assessed. The goal of this study is to determineoptimal routes and to find accommodations that minimize the total inspection cost, including the traveland lodging costs. The problem is solved using an ant colony optimization (ACO) algorithm. In addition, alocal search method is proposed for improving the quality of the solutions. Three benchmark datasets aregenerated to estimate the performance of the proposed method. First, a combination of the ACO parametervalues that yielded overall good results is determined, and subsequently the proposed method is appliedto the benchmarks. The results indicate that the proposed process yield promising solutions within areasonable time frame.