平凡的理想主义者 2015-08-28 03:02 采纳率: 0%
浏览 1673

向html中插入外部样式表

这是html文件 1.html
<!DOCTYPE html>



CSSTest4





This is some text.This is some text.This is some text.
This is some text.This is some text.This is some text.
This is some text.This is some text.This is some text.
This is some text.This is some text.This is some text.
This is some text.This is some text.This is some text.
This is some text.This is some text.This is some text.
This is some text.This is some text.This is some text.
This is some text.This is some text.This is some text.



这是CSS文件 1.css
@CHARSET "UTF-8";
img{
float:right;
border:2px dotted yellow;
margin:0px 0px 30px 30px;
}
p{background-color: gray}

不知道为什么1.css对1.html不起作用?

  • 写回答

3条回答 默认 最新

  • wn_hello 2015-08-28 03:04
    关注

    你给出的html代码是全部的html代码吗?为啥连标签都没有,你在css中是对img标签和p标签操作的,你的html并没有这些标签,而且调用外部的css文件是需要link或者import的,请搞清楚html的基础语法。

    评论

报告相同问题?

悬赏问题

  • ¥15 写一个方法checkPerson,入参实体类Person,出参布尔值
  • ¥15 我想咨询一下路面纹理三维点云数据处理的一些问题,上传的坐标文件里是怎么对无序点进行编号的,以及xy坐标在处理的时候是进行整体模型分片处理的吗
  • ¥15 CSAPPattacklab
  • ¥15 一直显示正在等待HID—ISP
  • ¥15 Python turtle 画图
  • ¥15 关于大棚监测的pcb板设计
  • ¥15 stm32开发clion时遇到的编译问题
  • ¥15 lna设计 源简并电感型共源放大器
  • ¥15 如何用Labview在myRIO上做LCD显示?(语言-开发语言)
  • ¥15 Vue3地图和异步函数使用