{"id":238422,"date":"2023-12-26T07:20:21","date_gmt":"2023-12-25T23:20:21","guid":{"rendered":"https:\/\/www.idc.net\/help\/238422\/"},"modified":"2023-12-26T07:20:21","modified_gmt":"2023-12-25T23:20:21","slug":"css%e5%85%a5%e9%97%a8-outline-style%ef%bc%88%e8%bd%ae%e5%bb%93%e6%a0%b7%e5%bc%8f%ef%bc%89","status":"publish","type":"post","link":"https:\/\/idc.net\/help\/238422\/","title":{"rendered":"Css\u5165\u95e8: outline-style\uff08\u8f6e\u5ed3\u6837\u5f0f\uff09"},"content":{"rendered":"<p><title id=\"css%e5%85%a5%e9%97%a8-outline-style%ef%bc%88%e8%bd%ae%e5%bb%93%e6%a0%b7%e5%bc%8f%ef%bc%89-WzrHwnIufm\">Css\u5165\u95e8: outline-style\uff08\u8f6e\u5ed3\u6837\u5f0f\uff09<\/title><\/p>\n<h1 id=\"css%e5%85%a5%e9%97%a8-outline-style%ef%bc%88%e8%bd%ae%e5%bb%93%e6%a0%b7%e5%bc%8f%ef%bc%89-WzrHwnIufm\">Css\u5165\u95e8: outline-style\uff08\u8f6e\u5ed3\u6837\u5f0f\uff09<\/h1>\n<p>CSS\u7684outline-style\u5c5e\u6027\u7528\u4e8e\u8bbe\u7f6e\u5143\u7d20\u7684\u8f6e\u5ed3\u6837\u5f0f\u3002\u8f6e\u5ed3\u662f\u7ed8\u5236\u5728\u5143\u7d20\u5468\u56f4\u7684\u4e00\u6761\u7ebf\uff0c\u4e0d\u5360\u7528\u7a7a\u95f4\uff0c\u4e0d\u4f1a\u5f71\u54cd\u5143\u7d20\u7684\u5c3a\u5bf8\u548c\u4f4d\u7f6e\u3002<\/p>\n<h2 id=\"%e8%af%ad%e6%b3%95-WzrHwnIufm\">\u8bed\u6cd5<\/h2>\n<p>outline-style\u5c5e\u6027\u7684\u8bed\u6cd5\u5982\u4e0b\uff1a<\/p>\n<pre><code>selector {\n  outline-style: none|hidden|dotted|dashed|solid|double|groove|ridge|inset|outset|initial|inherit;\n}\n<\/code><\/pre>\n<h2 id=\"%e5%8f%96%e5%80%bc-WzrHwnIufm\">\u53d6\u503c<\/h2>\n<ul>\n<li><strong>none\uff1a<\/strong>\u65e0\u8f6e\u5ed3\u6837\u5f0f\u3002<\/li>\n<li><strong>hidden\uff1a<\/strong>\u9690\u85cf\u8f6e\u5ed3\u6837\u5f0f\u3002<\/li>\n<li><strong>dotted\uff1a<\/strong>\u70b9\u72b6\u8f6e\u5ed3\u6837\u5f0f\u3002<\/li>\n<li><strong>dashed\uff1a<\/strong>\u865a\u7ebf\u8f6e\u5ed3\u6837\u5f0f\u3002<\/li>\n<li><strong>solid\uff1a<\/strong>\u5b9e\u7ebf\u8f6e\u5ed3\u6837\u5f0f\u3002<\/li>\n<li><strong>double\uff1a<\/strong>\u53cc\u7ebf\u8f6e\u5ed3\u6837\u5f0f\u3002<\/li>\n<li><strong>groove\uff1a<\/strong>\u51f9\u69fd\u8f6e\u5ed3\u6837\u5f0f\u3002<\/li>\n<li><strong>ridge\uff1a<\/strong>\u810a\u72b6\u8f6e\u5ed3\u6837\u5f0f\u3002<\/li>\n<li><strong>inset\uff1a<\/strong>\u5185\u5d4c\u8f6e\u5ed3\u6837\u5f0f\u3002<\/li>\n<li><strong>outset\uff1a<\/strong>\u5916\u5d4c\u8f6e\u5ed3\u6837\u5f0f\u3002<\/li>\n<li><strong>initial\uff1a<\/strong>\u8bbe\u7f6e\u4e3a\u9ed8\u8ba4\u503c\u3002<\/li>\n<li><strong>inherit\uff1a<\/strong>\u7ee7\u627f\u7236\u5143\u7d20\u7684\u8f6e\u5ed3\u6837\u5f0f\u3002<\/li>\n<\/ul>\n<h2 id=\"%e7%a4%ba%e4%be%8b-WzrHwnIufm\">\u793a\u4f8b<\/h2>\n<p>\u4ee5\u4e0b\u793a\u4f8b\u6f14\u793a\u4e86\u4e0d\u540c\u7684\u8f6e\u5ed3\u6837\u5f0f\uff1a<\/p>\n<pre><code>&lt;!DOCTYPE html&gt;\n&lt;html lang=\"zh-CN\"&gt;\n&lt;head&gt;\n&lt;meta charset=\"UTF-8\"&gt;\n&lt;title&gt;\u8f6e\u5ed3\u6837\u5f0f\u793a\u4f8b&lt;\/title&gt;\n&lt;style&gt;\n  .outline-example {\n    width: 200px;\n    height: 100px;\n    margin-bottom: 10px;\n    border: 1px solid black;\n  }\n  \n  .none {\n    outline-style: none;\n  }\n  \n  .dotted {\n    outline-style: dotted;\n  }\n  \n  .dashed {\n    outline-style: dashed;\n  }\n  \n  .solid {\n    outline-style: solid;\n  }\n  \n  .double {\n    outline-style: double;\n  }\n  \n  .groove {\n    outline-style: groove;\n  }\n  \n  .ridge {\n    outline-style: ridge;\n  }\n  \n  .inset {\n    outline-style: inset;\n  }\n  \n  .outset {\n    outline-style: outset;\n  }\n&lt;\/style&gt;\n&lt;\/head&gt;\n&lt;body&gt;\n  &lt;div class=\"outline-example none\"&gt;\u65e0\u8f6e\u5ed3\u6837\u5f0f&lt;\/div&gt;\n  &lt;div class=\"outline-example dotted\"&gt;\u70b9\u72b6\u8f6e\u5ed3\u6837\u5f0f&lt;\/div&gt;\n  &lt;div class=\"outline-example dashed\"&gt;\u865a\u7ebf\u8f6e\u5ed3\u6837\u5f0f&lt;\/div&gt;\n  &lt;div class=\"outline-example solid\"&gt;\u5b9e\u7ebf\u8f6e\u5ed3\u6837\u5f0f&lt;\/div&gt;\n  &lt;div class=\"outline-example double\"&gt;\u53cc\u7ebf\u8f6e\u5ed3\u6837\u5f0f&lt;\/div&gt;\n  &lt;div class=\"outline-example groove\"&gt;\u51f9\u69fd\u8f6e\u5ed3\u6837\u5f0f&lt;\/div&gt;\n  &lt;div class=\"outline-example ridge\"&gt;\u810a\u72b6\u8f6e\u5ed3\u6837\u5f0f&lt;\/div&gt;\n  &lt;div class=\"outline-example inset\"&gt;\u5185\u5d4c\u8f6e\u5ed3\u6837\u5f0f&lt;\/div&gt;\n  &lt;div class=\"outline-example outset\"&gt;\u5916\u5d4c\u8f6e\u5ed3\u6837\u5f0f&lt;\/div&gt;\n&lt;\/body&gt;\n&lt;\/html&gt;\n<\/code><\/pre>\n<h2 id=\"%e6%80%bb%e7%bb%93-WzrHwnIufm\">\u603b\u7ed3<\/h2>\n<p>\u901a\u8fc7\u4f7f\u7528CSS\u7684outline-style\u5c5e\u6027\uff0c\u6211\u4eec\u53ef\u4ee5\u4e3a\u5143\u7d20\u8bbe\u7f6e\u4e0d\u540c\u7684\u8f6e\u5ed3\u6837\u5f0f\uff0c\u4ee5\u589e\u5f3a\u9875\u9762\u7684\u53ef\u89c6\u5316\u6548\u679c\u3002\u6839\u636e\u9700\u8981\u9009\u62e9\u5408\u9002\u7684\u6837\u5f0f\uff0c\u5982\u5b9e\u7ebf\u3001\u865a\u7ebf\u3001\u70b9\u72b6\u7b49\uff0c\u4ee5\u53ca\u5185\u5d4c\u3001\u5916\u5d4c\u7b49\u6548\u679c\u3002\u4f7f\u7528outline-style\u5c5e\u6027\u53ef\u4ee5\u4f7f\u9875\u9762\u5143\u7d20\u66f4\u52a0\u7a81\u51fa\uff0c\u63d0\u5347\u7528\u6237\u4f53\u9a8c\u3002<\/p>\n<h3 id=\"%e9%a6%99%e6%b8%af%e6%9c%8d%e5%8a%a1%e5%99%a8%e9%a6%96%e9%80%89%e5%90%8e%e6%b5%aa%e4%ba%91-WzrHwnIufm\">\u9999\u6e2f\u670d\u52a1\u5668\u9996\u9009\u540e\u6d6a\u4e91<\/h3>\n<p>\u540e\u6d6a\u4e91\u63d0\u4f9b\u9ad8\u6027\u80fd\u7684\u9999\u6e2f\u670d\u52a1\u5668\uff0c\u4e3a\u7528\u6237\u63d0\u4f9b\u7a33\u5b9a\u53ef\u9760\u7684\u4e91\u8ba1\u7b97\u670d\u52a1\u3002\u4e86\u89e3\u66f4\u591a\u4fe1\u606f\uff0c\u8bf7\u8bbf\u95ee<a href=\"https:\/\/idc.net\">https:\/\/idc.net<\/a>\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Css\u5165\u95e8: outline-style\uff08\u8f6e\u5ed3\u6837\u5f0f\uff09 Css\u5165\u95e8: outline-style\uff08\u8f6e\u5ed3\u6837\u5f0f\uff09 C [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[197854],"tags":[],"class_list":["post-238422","post","type-post","status-publish","format-standard","hentry","category-html"],"_links":{"self":[{"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/posts\/238422","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/comments?post=238422"}],"version-history":[{"count":0,"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/posts\/238422\/revisions"}],"wp:attachment":[{"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/media?parent=238422"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/categories?post=238422"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/tags?post=238422"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}