星空网 > 软件开发 > 网页设计

CSS(一)

开始学习css之旅:先照样式做一个

一、使用DIV设置

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html ="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>第一个css样式</title><link type="text/css" rel="stylesheet" href="css/test1.css" /></head><body><div></div><div></div><div></div><div></div></body></html>

css:

@charset "utf-8";/* CSS Document *//*定义DIV元素方形显示*/div {  width:200px;  height:200px;  border:solid 2px blue;  float:left;  margin:4px;}

CSS(一)

二、使用类设置

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html ="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>第一个css样式</title><link type="text/css" rel="stylesheet" href="css/test1.css" /></head><body><div></div><div></div><div class="green"></div><div class="red"></div></body></html>

css

@charset "utf-8";/* CSS Document *//*定义DIV元素方形显示*/div {  width:200px;  height:200px;  border:solid 2px blue;  float:left;  margin:4px;}/*定义.green类设置背景为绿色*/.green{  background-color:green;}/*定义.red类设置背景为红色*/.red{  background-color:red;}

效果:

CSS(一)




原标题:CSS(一)

关键词:CSS

CSS
*特别声明:以上内容来自于网络收集,著作权属原作者所有,如有侵权,请联系我们: admin#shaoqun.com (#换成@)。

亚马逊开通旺季deal申报 / Amazon Attribution分析工具推出:https://www.ikjzd.com/articles/5700
沃尔玛和DoorDash联手对战亚马逊:https://www.ikjzd.com/articles/571
跨境电商旺季资金短缺解决方案!:https://www.ikjzd.com/articles/5711
货物发错目的港该怎么办?:https://www.ikjzd.com/articles/5715
32家中国企业被判侵权!亚马逊选品如何避免侵权?:https://www.ikjzd.com/articles/572
亚马逊8月13大新政汇总,想在旺季爆单的看过来!:https://www.ikjzd.com/articles/5721
最新研究:亚马逊、沃尔玛、Temu和Shein卖家重合率不断攀升:https://www.kjdsnews.com/a/1836554.html
三清山好玩乜?:https://www.vstour.cn/a/365182.html
相关文章
我的浏览记录
最新相关资讯
海外公司注册 | 跨境电商服务平台 | 深圳旅行社 | 东南亚物流