使用html和CSS进行网页网站设计 — 简明步骤

释放双眼,带上耳机,听听看~!

使用html和CSS进行网页网站设计 — 简明步骤

网页制作流程:

  1. 心中有规划,网站的骨架结构,页面布局layout.

  2. 创建一个用于创建模板dwt的html页: main.html

  3. 制作main.html:

(1) 在html文件中依次建立

<div id = "outter"> … </div>
<div id = "wraper"> … </div>
<div id = "top"> … </div>
<div id = "banner"> … </div>
<div id = "navigator"> … </div>
<div id = "content"> … </div>
<div id = "footer"> … </div>

   等等分区。

(2) 往分区中填入文字图片等内容。

(3) 新建一个css文件,在Dreamweaver下,CSS Designer(Shift+F11) -> "+" -> 新建并附加一个css样式表文件: ../style/style.css

(4) 编辑style.css,通过点击左上角切换html代码和css代码。

(5) 通过margin, width, float, padding, 等等css语句,进行layout

border, background-color, font-family, font-size,

或者使用class的概念,进行细分。

对于h1 html body p标签,亦可使用css, 和class

例( .myclass { } 和 <p class="myclass"></p> )

  1. main.html制作完成以后,save as a template.命名template.dwt。

  2. 打开template.dwt, 设置可编辑区域: Insert -> Template -> …

  3. Create index.html, apply your template: Modify -> Templates -> Apply or Detach

  4. 修改template.dwt, 另存为template002.dwt可用于其它风格的页面。

===================================================================================

【进阶教程】使网页交互,加入java script:

【准备工作】到jQuery.com, Dojotoolkit.org, Prototypejs.org下载js库文件

 
   放入js/library文件夹。

【目标】    建立slider动画,实现图片淡入淡出切换,一旁淡入说明文字。

1.首先我们要到网上下载支持slider的.js 和 .css的源文件。

   >>goole.com -> search "free slider js and css download"

   >>我们可以找到很多资源。比如wowslider.com

   >>下载了一个叫做Nivo Slider的资源,看起来还不错.

  1.  将他们放到../js/Nivo Slider文件夹下。

   在html页中添加如下代码,for the slider Plug In.

   <script type="text/javascript" src="Insert path to jQuery Library Here"></script>

   <script type="text/javascript" src="Insert path to jQuery Slider Plug In  Here"></script>

  1.  Add the link to the slider CSS file (make sure media is set to "screen")

   <link href="Insert Path the Slider CSS file" rel="stylesheet" type="text/css" media="screen">
——————–实际上可以参考如下代码——————


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
1&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.01//EN&quot; &quot;http://www.w3.org/TR/html4/strict.dtd&quot;&gt;
2&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=utf-8&quot;&gt;
3&lt;html lang=&quot;en&quot;&gt;
4&lt;head&gt;
5    &lt;title&gt;Nivo Slider Demo&lt;/title&gt;
6    &lt;link rel=&quot;stylesheet&quot; href=&quot;../themes/default/default.css&quot; type=&quot;text/css&quot; media=&quot;screen&quot; /&gt;
7    &lt;link rel=&quot;stylesheet&quot; href=&quot;../themes/light/light.css&quot; type=&quot;text/css&quot; media=&quot;screen&quot; /&gt;
8    &lt;link rel=&quot;stylesheet&quot; href=&quot;../themes/dark/dark.css&quot; type=&quot;text/css&quot; media=&quot;screen&quot; /&gt;
9    &lt;link rel=&quot;stylesheet&quot; href=&quot;../themes/bar/bar.css&quot; type=&quot;text/css&quot; media=&quot;screen&quot; /&gt;
10    &lt;link rel=&quot;stylesheet&quot; href=&quot;../nivo-slider.css&quot; type=&quot;text/css&quot; media=&quot;screen&quot; /&gt;
11    &lt;link rel=&quot;stylesheet&quot; href=&quot;style.css&quot; type=&quot;text/css&quot; media=&quot;screen&quot; /&gt;
12&lt;/head&gt;
13&lt;body&gt;
14    &lt;div id=&quot;wrapper&quot;&gt;
15        &lt;a href=&quot;http://dev7studios.com&quot; id=&quot;dev7link&quot; title=&quot;Go to dev7studios&quot;&gt;dev7studios&lt;/a&gt;
16
17
18        &lt;div class=&quot;slider-wrapper theme-default&quot;&gt;
19            &lt;div id=&quot;slider&quot; class=&quot;nivoSlider&quot;&gt;
20                &lt;img src=&quot;images/toystory.jpg&quot; data-thumb=&quot;images/toystory.jpg&quot; alt=&quot;&quot; /&gt;
21                &lt;a href=&quot;http://dev7studios.com&quot;&gt;&lt;img src=&quot;images/up.jpg&quot; data-thumb=&quot;images/up.jpg&quot; alt=&quot;&quot; title=&quot;This is an example of a caption&quot; /&gt;&lt;/a&gt;
22                &lt;img src=&quot;images/walle.jpg&quot; data-thumb=&quot;images/walle.jpg&quot; alt=&quot;&quot; data-transition=&quot;slideInLeft&quot; /&gt;
23                &lt;img src=&quot;images/nemo.jpg&quot; data-thumb=&quot;images/nemo.jpg&quot; alt=&quot;&quot; title=&quot;#htmlcaption&quot; /&gt;
24            &lt;/div&gt;
25            &lt;div id=&quot;htmlcaption&quot; class=&quot;nivo-html-caption&quot;&gt;
26                &lt;strong&gt;This&lt;/strong&gt; is an example of a &lt;em&gt;HTML&lt;/em&gt; caption with &lt;a href=&quot;#&quot;&gt;a link&lt;/a&gt;.
27            &lt;/div&gt;
28        &lt;/div&gt;
29
30
31    &lt;/div&gt;
32    &lt;script type=&quot;text/javascript&quot; src=&quot;scripts/jquery-1.7.1.min.js&quot;&gt;&lt;/script&gt;
33    &lt;script type=&quot;text/javascript&quot; src=&quot;../jquery.nivo.slider.js&quot;&gt;&lt;/script&gt;
34    &lt;script type=&quot;text/javascript&quot;&gt;
35    $(window).load(function() {
36        $(&#x27;#slider&#x27;).nivoSlider();
37    });
38    &lt;/script&gt;
39&lt;/body&gt;
40&lt;/html&gt;
41

——————–参考如上代码示例———————–

        即可完成。

        效果参考:http://dev7studios.com/nivo-slider\#/demos
要想简单,我们使用了s3slider这个slider。

        下载请见:http://www.serie3.info/s3slider/
改良版:http://pan.baidu.com/s/1mT2GK

==================================================================================================================================

        Feature Content Slider效果的添加:

        源文件和使用方法,参考:http://webdeveloperplus.com/jquery/featured-content-slider-using-jquery-ui/

===================================================================================================================================

        进阶教程:Set up a [Lightbox image galary]
Image galary的一个集贴在这里:
http://webdeveloperplus.com/jquery/21-brilliant-jquery-image-galleryslideshow-plugins/
我们要用Lightbox Galary:
介绍网页:http://leandrovieira.com/projects/jquery/lightbox/
作者主页:http://lokeshdhakar.com/projects/lightbox2/

===================================================================================

        有个网站的资源很多,主流的特效都可以从这里找到:http://webdeveloperplus.com/

很不错,值得收藏。

==================================================================================================================================

        加入Modal Popup jQuery Javascript 效果:

        popup名称:reveal popup

        http://zurb.com/playground/reveal-modal-plugin
此效果实现的是,点击“查看详情”,淡入详情介绍小窗口。

===============================================================================

posted on
2013-09-30 23:42 sonictl 阅读(
…) 评论(
…) 编辑 收藏

转载于:https://www.cnblogs.com/sonictl/p/6735625.html

给TA打赏
共{{data.count}}人
人已打赏
安全技术

C++ 用libcurl库进行http通讯网络编程

2022-1-11 12:36:11

安全运维

ITIL实践案例 – ITIL在招商项目实施思路

2024-12-21 17:15:56

个人中心
购物车
优惠劵
今日签到
有新私信 私信列表
搜索