1. Trang chủ
  2. » Công Nghệ Thông Tin

Session5 module16 17 HTML5 and CSS3 elements

53 284 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 53
Dung lượng 2,27 MB

Các công cụ chuyển đổi và chỉnh sửa cho tài liệu này

Nội dung

Lập trình web tĩnh Html dành cho người mới bắt đầu học lập trình web Mình khuyên các bạn nên học đầy đủ từ bài số 1 trở điVà kết hợp với video khi sử dụng slide nhưng do video mình chưa có thời gia up lên khi nào có mình sẽ cho link lên mục này

Trang 1

Session 5

Module 16: HTML5 Elements

Module 17: Introduction to CSS3

Trang 2

Session 6 – Objectives (1)

Trang 4

Evolution of Web

Technologies

Trang 5

Introduction to HTML5 (1)

Trang 6

Introduction to HTML5 (2)

XHTML, and the HTML DOM

most modern browsers have some HTML5 support

Trang 7

New HTML5 Elements

playback

footer, header, nav, section

email, url, search

Trang 8

Layout Tags (1)

Trang 9

Layout Tags (1)

Trang 10

Layout Tags Demo

Trang 11

HTML5 Forms Elements (1)

Trang 12

HTML5 Forms Elements (2)

Trang 13

HTML5 Forms Elements Demo

E-mail: <input type="email" name="user_email" autofocus required /> Homepage: <input type="url" name="user_url" />

Points: <input type="number" name="points" min="1" max="10" />

Points:<input type="range" name="points_range" min="1" max="10" /> Date: <input type="date" name="user_date" />

E-mail: <input type="email" name="user_email" autofocus required /> Homepage: <input type="url" name="user_url" />

Points: <input type="number" name="points" min="1" max="10" />

Points:<input type="range" name="points_range" min="1" max="10" /> Date: <input type="date" name="user_date" />

Output on Opera

Trang 14

Video on Web (1)

Trang 15

<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"

width="425" height="344"

codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/ swflash.cab#version=6,0,40,0">

<param name="allowFullScreen" value="true" />

<param name="allowscriptaccess" value="always" />

<param name=“src” value=“http://www.youtube.com/v/oHg5SJYRHA0 &hl=en&fs=1&" />

<param name="allowfullscreen" value="true" />

<param name="allowFullScreen" value="true" />

<param name="allowscriptaccess" value="always" />

<param name=“src” value=“http://www.youtube.com/v/oHg5SJYRHA0 &hl=en&fs=1&" />

<param name="allowfullscreen" value="true" />

Trang 16

<audio src="song.mp3" controls="controls"></audio>

<video width="320" height="240" controls="controls">

<source src="movie.ogg" type="video/ogg" />

<source src="movie.mp4" type="video/mp4" />

<source src="movie.webm" type="video/webm" />

</video

<audio src="song.mp3" controls="controls"></audio>

<video width="320" height="240" controls="controls">

<source src="movie.ogg" type="video/ogg" />

<source src="movie.mp4" type="video/mp4" />

<source src="movie.webm" type="video/webm" />

</video

HTML5 Audio and Video

Look, so easy, so simple

Look, so easy, so simple

Trang 17

Video Element Attributes

Trang 18

HTML 5 Video Format

for the video element:

o Ogg = Ogg files with Thedora video codec

o Vorbis audio codecMPEG4 = MPEG 4 files with H.264 video codec and AAC audio codec.

Trang 19

2D and 3D Drawing

Trang 20

Canvas Element

draw graphics on a Web page

every pixel of it

draw graphics on a web page

Trang 21

Canvas Element Demo

<canvas id="myCanvas" width="200" height="100" style="border:1px solid #c3c3c3;”>Your browser does not support the canvas element.

Trang 22

Introduction to CSS3

 CSS is used to control the style and layout of Web pages

W3C CSS specification, from currently supported visual effects to the most cutting-edge animation techniques

Trang 24

CSS3-Vendor Specific Extensions(1)

implement extensions to the CSS specifications that, in most cases, are proprietary to their browser

as adding new features for users, or for experiments and debugging

Trang 25

 In order to accommodate the release of specific extensions, the CSS specifications define a specific format that vendors should follow:

vendor-o '-' + vendor specific identifier + '-' + attribute

o '_' + vendor specific identifier + '-' + attribute

Trang 26

Prefix Organisation

-ms- Microsoft

mso- Microsoft Office

-moz- Mozilla Foundation (Gecko-based browsers) -o- Opera Software

-atsc- Advanced Television Standards Committee

-wap- The WAP Forum

-webkit- Safari (and other WebKit-based browsers)

CSS3-Vendor Specific Extensions(3)

Trang 27

CSS3 – Borders (1)

add shadow to boxes, and use an image as a border - without using a design program, like Photoshop

o border-radius

o box-shadow

o border-image

Trang 28

CSS3 – Borders (1)

Trang 31

CSS3 - Border Images

/* CSS */

#round

{

border-width:15px; width:250px; padding:10px 20px;

-moz-border-image:url(border.png) 30 30 round; /* Firefox */

-webkit-border-image:url(border.png) 30 30 round; /* Safari and Chrome */

border-width:15px; width:250px; padding:10px 20px;

-moz-border-image:url(border.png) 30 30 round; /* Firefox */

-webkit-border-image:url(border.png) 30 30 round; /* Safari and Chrome */

Trang 33

CSS3 - Web Fonts

that were already installed on the user's computer

using CSS3 @font-face rule

Trang 34

CSS3 - Web Fonts Demo

Trang 36

CSS3 Text Shadow Demo

Trang 37

CSS3 Word Wrapping Demo

gword The long word will brake

and wrap to the next line.</p>

gword The long word will brake

and wrap to the next line.</p>

Output

Trang 38

CSS3 - Multiple Columns

columns for laying out text - like in newspapers

o column-count

o column-gap

o column-rule

Trang 39

CSS3 - Multiple Columns Demo

Output

Trang 40

CSS3 - Transformations

move, scale, turn, spin, and stretch elements

Trang 41

The translate() Method

from its current position, depending on the parameters given for the left (X-axis) and the top (Y-axis) position

the element 50 pixels from the left, and 100 pixels from the top

Trang 42

The translate() Method Demo

Trang 43

The rotate() Method

clockwise at a given degree Negative values are allowed and rotates the element counter-clockwise

element clockwise 30 degrees

Trang 44

The rotate() Method Demo

/* CSS */

div

{

margin:10px; width:100px; height:75px;

background:lavender; border:1px solid black;

margin:10px; width:100px; height:75px;

background:lavender; border:1px solid black;

Trang 45

The scale() Method

decreases the size of an element

be twice its original size, and the height 4 times its original size

Trang 46

The scale() Method Demo

Trang 47

The skew() Method

angle, depending on the parameters given for the horizontal (X-axis) and the vertical (Y-axis) lines

element 30 degrees around the X-axis, and 20 degrees around the Y-axis

Trang 48

The skew() Method Demo

Trang 49

CSS3 - Animations (1)

can replace animated images, Flash animations, and JavaScripts in many web pages

appearance of an element in the browser by translating, rotating or other means

animation

Trang 50

CSS3 - Animations (2)

Trang 51

CSS3 - Animations Demo

/* CSS in Safari and Chrome */

@-webkit-keyframes myfirst {

from {background: red;}

to {background: yellow;}

}

#box {

width:100px; height:100px; background:red;

from {background: red;}

to {background: yellow;}

}

#box {

width:100px; height:100px; background:red;

Trang 52

Session 5 - Summary (1)

XHTML, and the HTML DOM

o Semantics (Layout tags, Link Relations…)

o Web Forms 2.0 (Input Fields)

o Multimedia (Audio Tag, Video Tag)

Trang 53

Session 5 - Summary (2)

W3C CSS specification with new visual effects and animation techniques

Ngày đăng: 20/11/2015, 11:14

TỪ KHÓA LIÊN QUAN

w