HTML如何和css结合使用

2020-08-23 军事 88阅读
如果是在页面中添加css 就在标签中用
style="这里为要设置的样式属性"

文字大小</p>
如果是在页面中链接css 就在根目录对应的样式文件夹中单独建立css 文件,并在html 页面中的</head>里的</title>下使用链接式将样式导入进来(这是最常用的方法)<br />如<br />命名单独的css 文件为lead.css<br />html 页面中为<br /><head><br /><title></title><br /><link rel="stylesheet" type="text/css" href="lead.css"/><br /></head> </div> <div class="tags"> </div> <div class="clear"> <div class="shares"> <b>声明:你问我答网所有作品(图文、音视频)均由用户自行上传分享,仅供网友学习交流。若您的权利被侵害,请联系fangmu6661024@163.com</b> <div id="share" class="share-component social-share" data-sites="weibo,qzone,qq,wechat"> </div> </div> <div class="act"> <a href="JavaScript:" onclick="zan('488607188')" class="zan" title="赞"> <i class="iconfont bx bx-like"></i> <span id="zan">0</span> </a> </div> </div> <div class="clear"></div> </div> <div class="ny-ad"> </div> <div class="ny-ad"> </div> <div class="like"> <h3 class="title">最新文章</h3> <div class="piclist likep"> <div class="li"> <div class="img"> <a href="https://w.sf024.com/info/1372421586512722379.html" title="中国的四大航天发射基地在哪里?"> <img src="https://w.sf024.com/assets/img/default.jpg" alt=""> </a> </div> <a href="https://w.sf024.com/ask/15" class="cat">军事 </a> <h3> <a href="https://w.sf024.com/info/1372421586512722379.html" title="中国的四大航天发射基地在哪里?">中国的四大航天发射基地在哪里?</a> </h3> <div class="meta"> <span class="time"> <i class="iconfont bx bx-time"></i> 04-15 </span> <span class="views"> <i class="iconfont bx bx-show"></i> 167阅读 </span> </div> </div> <div class="li"> <div class="img"> <a href="https://w.sf024.com/info/1437332633074022819.html" title="李宁云,特步的动力巢,安踏的虫洞闪能,匹克的态极哪个比较好"> <img src="https://w.sf024.com/assets/img/default.jpg" alt=""> </a> </div> <a href="https://w.sf024.com/ask/15" class="cat">军事 </a> <h3> <a href="https://w.sf024.com/info/1437332633074022819.html" title="李宁云,特步的动力巢,安踏的虫洞闪能,匹克的态极哪个比较好">李宁云,特步的动力巢,安踏的虫洞闪能,匹克的态极哪个比较好</a> </h3> <div class="meta"> <span class="time"> <i class="iconfont bx bx-time"></i> 04-15 </span> <span class="views"> <i class="iconfont bx bx-show"></i> 1997阅读 </span> </div> </div> <div class="li"> <div class="img"> <a href="https://w.sf024.com/info/262973923482507045.html" title="《越狱》胡克定律那个虎头求图片"> <img src="https://w.sf024.com/assets/img/default.jpg" alt=""> </a> </div> <a href="https://w.sf024.com/ask/15" class="cat">军事 </a> <h3> <a href="https://w.sf024.com/info/262973923482507045.html" title="《越狱》胡克定律那个虎头求图片">《越狱》胡克定律那个虎头求图片</a> </h3> <div class="meta"> <span class="time"> <i class="iconfont bx bx-time"></i> 04-16 </span> <span class="views"> <i class="iconfont bx bx-show"></i> 127阅读 </span> </div> </div> <div class="clear"></div> </div> </div> <div class="ny-ad"> </div> </div> <div class="sidebar"> <div class="widget postlist"> <h3>猜你喜欢</h3> <ul class="hasimg"> <li> <a href="https://w.sf024.com/info/488607188.html" title="HTML如何和css结合使用" class="img"> <img src="https://w.sf024.com/assets/img/default.jpg" alt="HTML如何和css结合使用"> </a> <a href="https://w.sf024.com/info/488607188.html" target="">HTML如何和css结合使用...</a> <p class="meta"> <span> <i class="iconfont bx bx-time"></i> 08-23 </span><span> <i class="iconfont bx bx-show"></i> 88阅读 </span> </p> </li> <li> <a href="https://w.sf024.com/info/533794472.html" title="前台用html5+css3做好的页面·怎么结合到asp.net和sql弄后台哇?" class="img"> <img src="https://w.sf024.com/assets/img/default.jpg" alt="前台用html5+css3做好的页面·怎么结合到asp.net和sql弄后台哇?"> </a> <a href="https://w.sf024.com/info/533794472.html" target="">前台用html5+css3做好的...</a> <p class="meta"> <span> <i class="iconfont bx bx-time"></i> 05-12 </span><span> <i class="iconfont bx bx-show"></i> 120阅读 </span> </p> </li> <li> <a href="https://w.sf024.com/info/812102919599153212.html" title="HTML 无序列表项目符号使用图片居中的CSS写法" class="img"> <img src="https://w.sf024.com/assets/img/default.jpg" alt="HTML 无序列表项目符号使用图片居中的CSS写法"> </a> <a href="https://w.sf024.com/info/812102919599153212.html" target="">HTML 无序列表项目符号使用图...</a> <p class="meta"> <span> <i class="iconfont bx bx-time"></i> 05-15 </span><span> <i class="iconfont bx bx-show"></i> 82阅读 </span> </p> </li> <li> <a href="https://w.sf024.com/info/1818894753514467028.html" title="html如何跟css链接" class="img"> <img src="https://w.sf024.com/assets/img/default.jpg" alt="html如何跟css链接"> </a> <a href="https://w.sf024.com/info/1818894753514467028.html" target="">html如何跟css链接...</a> <p class="meta"> <span> <i class="iconfont bx bx-time"></i> 10-21 </span><span> <i class="iconfont bx bx-show"></i> 63阅读 </span> </p> </li> <li> <a href="https://w.sf024.com/info/558057935591329732.html" title="CSS框架怎么使用?根据框架里的的规范,然后给html元素起同样啊类名?" class="img"> <img src="https://w.sf024.com/assets/img/default.jpg" alt="CSS框架怎么使用?根据框架里的的规范,然后给html元素起同样啊类名?"> </a> <a href="https://w.sf024.com/info/558057935591329732.html" target="">CSS框架怎么使用?根据框架里的...</a> <p class="meta"> <span> <i class="iconfont bx bx-time"></i> 04-26 </span><span> <i class="iconfont bx bx-show"></i> 75阅读 </span> </p> </li> <li> <a href="https://w.sf024.com/info/2056813718639054667.html" title="如何注释html,css,js代码" class="img"> <img src="https://w.sf024.com/assets/img/default.jpg" alt="如何注释html,css,js代码"> </a> <a href="https://w.sf024.com/info/2056813718639054667.html" target="">如何注释html,css,js代...</a> <p class="meta"> <span> <i class="iconfont bx bx-time"></i> 04-18 </span><span> <i class="iconfont bx bx-show"></i> 76阅读 </span> </p> </li> <li> <a href="https://w.sf024.com/info/1800699969267007747.html" title="如何在html中添加css样式" class="img"> <img src="https://w.sf024.com/assets/img/default.jpg" alt="如何在html中添加css样式"> </a> <a href="https://w.sf024.com/info/1800699969267007747.html" target="">如何在html中添加css样式...</a> <p class="meta"> <span> <i class="iconfont bx bx-time"></i> 04-14 </span><span> <i class="iconfont bx bx-show"></i> 62阅读 </span> </p> </li> <li> <a href="https://w.sf024.com/info/524439483.html" title="0基础如何自学html和css" class="img"> <img src="https://w.sf024.com/assets/img/default.jpg" alt="0基础如何自学html和css"> </a> <a href="https://w.sf024.com/info/524439483.html" target="">0基础如何自学html和css...</a> <p class="meta"> <span> <i class="iconfont bx bx-time"></i> 05-31 </span><span> <i class="iconfont bx bx-show"></i> 52阅读 </span> </p> </li> <li> <a href="https://w.sf024.com/info/496938607238231644.html" title="html+css修改,如何能让导航栏和底层图调换位置,还有如何能让html代码里面的图片居中在css上。30分" class="img"> <img src="https://w.sf024.com/assets/img/default.jpg" alt="html+css修改,如何能让导航栏和底层图调换位置,还有如何能让html代码里面的图片居中在css上。30分"> </a> <a href="https://w.sf024.com/info/496938607238231644.html" target="">html+css修改,如何能让导...</a> <p class="meta"> <span> <i class="iconfont bx bx-time"></i> 10-28 </span><span> <i class="iconfont bx bx-show"></i> 126阅读 </span> </p> </li> <li> <a href="https://w.sf024.com/info/490951658207731772.html" title="如何 用HTML+CSS+JS开发移动APP" class="img"> <img src="https://w.sf024.com/assets/img/default.jpg" alt="如何 用HTML+CSS+JS开发移动APP"> </a> <a href="https://w.sf024.com/info/490951658207731772.html" target="">如何 用HTML+CSS+JS开...</a> <p class="meta"> <span> <i class="iconfont bx bx-time"></i> 06-05 </span><span> <i class="iconfont bx bx-show"></i> 76阅读 </span> </p> </li> </ul> </div> </div> </div> </section> <footer class="footer"> <div class="container"> <p class="copyright">COPYRIGHT 2013 - 2024 你问我答网®. ALL RIGHTS RESERVED. | <a href="https://beian.miit.gov.cn/" target="_blank">豫ICP备2020035127号</a></p> </div> </footer> <script> let search_type="1"; var _hmt = _hmt || []; (function() { var hm = document.createElement("script"); hm.src = "https://hm.baidu.com/hm.js?752ceaa2e03e39366ceff9a414a1f6a7"; var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(hm, s); })(); (function(){ var bp = document.createElement('script'); var curProtocol = window.location.protocol.split(':')[0]; if (curProtocol === 'https') { bp.src = 'https://zz.bdstatic.com/linksubmit/push.js'; } else { bp.src = 'http://push.zhanzhang.baidu.com/push.js'; } var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(bp, s); })();</script> <script type="text/javascript" src="https://w.sf024.com/assets/js/jquery.share.min.js"></script> </body> </html>