{"id":2413,"date":"2023-11-14T11:59:00","date_gmt":"2023-11-14T03:59:00","guid":{"rendered":""},"modified":"2023-11-14T11:59:00","modified_gmt":"2023-11-14T03:59:00","slug":"CSS content","status":"publish","type":"post","link":"https:\/\/bianchenghao6.com\/2413.html","title":{"rendered":"CSS content"},"content":{"rendered":"
\n

CSS content<\/h1>\n<\/div>\n
\n \u6b64CSS\u5c5e\u6027\u4f1a\u751f\u6210\u52a8\u6001\u5185\u5bb9\u3002\u5b83\u53ef\u4ee5\u4e0e\u4f2a\u5143\u7d20
\n ::before <\/strong>\u548c
\n ::after <\/strong>\u4e00\u8d77\u4f7f\u7528\u3002\u6240\u6709\u6d4f\u89c8\u5668\u5747\u5b8c\u5168\u652f\u6301\u6b64CSS\u5c5e\u6027\uff0c\u8be5CSS\u5c5e\u6027\u7528\u4e8e\u5c06\u751f\u6210\u7684\u5185\u5bb9\u63d2\u5165\u7f51\u9875\u4e2d\u3002\n<\/div>\n
\n \u5b83\u5c06\u5143\u7d20\u66ff\u6362\u4e3a\u751f\u6210\u7684\u503c\u3002\n<\/div>\n

\u8bed\u6cd5<\/h3>\n
\n
 content: normal | none | counter | string | attr | open-quote | close-quote | no-close-quote | no-open-quote | url | initial | inherit; <\/span><\/code><\/pre>\n<\/div>\n

\u5c5e\u6027\u503c<\/h3>\n
\n \u6b64 CSS\u5c5e\u6027\u5177\u6709\u8bb8\u591a\u503c\uff0c\u5b83\u4eec\u5206\u522b\u662f\u5b9a\u4e49\u5982\u4e0b\u8868\uff1a\n<\/div>\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
\u503c<\/td>\n\u8bf4\u660e<\/td>\n<\/tr>\n
normal<\/strong> <\/td>\n\u7528\u4e8e\u8bbe\u7f6e\u9ed8\u8ba4\u503c<\/td>\n<\/tr>\n
none<\/strong> <\/td>\n\u6b64\u503c\u4e0d\u4f1a\u8bbe\u7f6e\u5185\u5bb9\u3002<\/td>\n<\/tr>\n
counter<\/strong> <\/td>\n\u5b83\u5c06\u5185\u5bb9\u8bbe\u7f6e\u4e3a\u8ba1\u6570\u5668\u3002\u901a\u5e38\u662f\u4e00\u4e2a\u6570\u5b57\u3002\u4f7f\u7528 counter()<\/strong>\u6216 counters()<\/strong>\u51fd\u6570\u663e\u793a\u3002<\/td>\n<\/tr>\n
string<\/strong> <\/td>\n\u5b83\u7528\u4e8e\u8bbe\u7f6e\u4efb\u4f55\u5b57\u7b26\u4e32\u503c\u3002\u5b83\u5e94\u59cb\u7ec8\u7528\u5f15\u53f7\u5f15\u8d77\u6765\u3002\u5b83\u4f1a\u5728HTML\u5143\u7d20\u4e4b\u540e\u6216\u4e4b\u524d\u751f\u6210\u4efb\u4f55\u5b57\u7b26\u4e32\u3002<\/td>\n<\/tr>\n
attr <\/strong> <\/td>\n\u5b83\u5c06\u5728\u5143\u7d20\u4e4b\u540e\u6216\u4e4b\u524d\u63d2\u5165\u6307\u5b9a\u5c5e\u6027\u7684\u503c\u3002\u5982\u679c\u9009\u62e9\u5668\u6ca1\u6709\u7279\u5b9a\u5c5e\u6027\uff0c\u5219\u5c06\u63d2\u5165\u4e00\u4e2a\u7a7a\u5b57\u7b26\u4e32\u3002<\/td>\n<\/tr>\n
open-quote<\/strong> <\/td>\n\u7528\u4e8e\u63d2\u5165\u5f15\u53f7\uff0c\u6216\u5c06\u5185\u5bb9\u8bbe\u7f6e\u4e3a\u5f15\u53f7\u3002<\/td>\n<\/tr>\n
close-quote<\/strong> <\/td>\n\u7528\u4e8e\u63d2\u5165\u53f3\u5f15\u53f7\uff0c\u6216\u5c06\u5185\u5bb9\u8bbe\u7f6e\u4e3a\u53f3\u5f15\u53f7\u3002 <\/td>\n<\/tr>\n
no-close-quote<\/strong> <\/td>\n\u5982\u679c\u6307\u5b9a\u4e86\u53f3\u5f15\u53f7\uff0c\u5219\u7528\u4e8e\u4ece\u5185\u5bb9\u4e2d\u5220\u9664\u53f3\u5f15\u53f7\u3002<\/td>\n<\/tr>\n
no-open-quote<\/strong> <\/td>\n\u5982\u679c\u6307\u5b9a\u4e86\u5f00\u5934\u5f15\u53f7\uff0c\u5219\u7528\u4e8e\u4ece\u5185\u5bb9\u4e2d\u5220\u9664\u5f00\u5934\u5f15\u53f7\u3002<\/td>\n<\/tr>\n
url <\/strong> <\/td>\n\u5b83\u7528\u4e8e\u5c06\u5185\u5bb9\u8bbe\u7f6e\u4e3a\u67d0\u4e9b\u5a92\u4f53\uff0c\u53ef\u4ee5\u662f\u56fe\u50cf\uff0c\u89c6\u9891\uff0c\u97f3\u9891\u7b49\u7b49\u3002<\/td>\n<\/tr>\n
initial<\/strong> <\/td>\n\u7528\u4e8e\u5c06\u5c5e\u6027\u8bbe\u7f6e\u4e3a\u5176\u9ed8\u8ba4\u503c\u3002<\/td>\n<\/tr>\n
inherit<\/strong> <\/td>\n\u5b83\u4ece\u5176\u7236\u5143\u7d20\u7ee7\u627f\u5c5e\u6027\u3002<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n
\n \u6211\u4eec\u770b\u770b\u6b64CSS\u5c5e\u6027\u7684\u4e00\u4e9b\u8bf4\u660e\u3002\n<\/div>\n
\n \u793a\u4f8b-<\/strong>\u4f7f\u7528
\n normal <\/strong>\u548c
\n none <\/strong>\u503c\n<\/div>\n
\n \u5728\u6b64\u793a\u4f8b\u4e2d\uff0c\u6211\u4eec\u4f7f\u7528
\n :: before <\/strong>\u4f2a\u5143\u7d20\u5728\u6bb5\u843d\u5143\u7d20\u4e4b\u524d\u63d2\u5165\u6587\u672c
\n \" Welcome\" <\/strong>\u3002\u6587\u672c\u4e0d\u4f1a\u88ab\u6dfb\u52a0\u5230\u6211\u4eec\u5728\u5176\u4e2d\u5e94\u7528\u4e86
\n normal <\/strong>\u548c
\n none<\/strong> \u503c\u7684\u90a3\u4e9b\u6bb5\u843d\u5143\u7d20\u3002\n<\/div>\n
\n
 <!DOCTYPE html>
<html><\/span>
<head><\/span>
    <title><\/span>
        CSS content Property
    <\/title><\/span>
    <style><\/span>
    body {
        text-align: center;
    }
    p {
        font-size: 25px;
    }
    p::before {
        content: \"Welcome \"<\/span>;
    }
    #para::before {
<\/span>         content: normal;
    }
    #para1::before {
<\/span>         content: none;
    }
    <\/style><\/span>
<\/head><\/span>
<body><\/span>
    <h1><\/span> CSS content property <\/h1><\/span>
    <h2><\/span> Use of content: normal; and content: none; <\/h2><\/span>
    <p><\/span> to the bianchenghao6.com <\/p><\/span>
    <p id=\"para\"<\/span>> This is a paragraph using <b><\/span>normal<\/b><\/span> value. <\/p><\/span>
    <p id=\"para1\"<\/span>> This is another paragraph using <b><\/span>none<\/b><\/span> value. <\/p><\/span>
<\/body><\/span>
<\/html><\/span>
<\/span><\/code><\/pre>\n<\/div>\n
\n \u8f93\u51fa<\/strong>\n<\/div>\n

CSS content_https:\/\/bianchenghao6.com_\u3010CSS \u6559\u7a0b\u3011_\u7b2c1\u5f20 <\/p>\n

\n \u793a\u4f8b-<\/strong>\u4f7f\u7528
\n string<\/strong>\u548c
\n url <\/strong>\u503c\n<\/div>\n
\n \u5728\u6b64\u793a\u4f8b\u4e2d\uff0c\u6587\u672c
\n \" Hello World\u3002Welcome\" <\/strong>\u901a\u8fc7\u4f7f\u7528content\u5c5e\u6027\u548c
\n :: before <\/strong>\u4f2a\u5143\u7d20\u6dfb\u52a0\u3002\n<\/div>\n
\n
 <!DOCTYPE html>
<html><\/span>
<head><\/span>
    <title><\/span>
        CSS content Property
    <\/title><\/span>
    <style><\/span>
    body {
        text-align: center;
    }
    p {
        font-size: 25px;
    }
    p::before {
        content: \"Hello World. Welcome \"<\/span>;
    }
    #para::before {
<\/span>         content: url(\"https:\/\/bianchenghao6.com\/images\/icon3.png\"<\/span><\/span>);
    }
    #para1::before {
<\/span>         content: url(\"https:\/\/bianchenghao6.com\/images\/icon3.png\");
    }
    <\/style><\/span>
<\/head><\/span>
<body><\/span>
    <h1><\/span> CSS content property <\/h1><\/span>
    <h2><\/span> Use of content: string; and content: url(); <\/h2><\/span>
    <p><\/span> to the bianchenghao6.com <\/p><\/span>
    <p id=\"para\"<\/span>> This is a paragraph using the <b><\/span>url()<\/b><\/span> value. <\/p><\/span>
    <p id=\"para1\"<\/span>> This is another paragraph using the <b><\/span>url()<\/b><\/span> value. <\/p><\/span>
<\/body><\/span>
<\/html><\/span>
<\/span><\/code><\/pre>\n<\/div>\n
\n \u8f93\u51fa<\/strong>\n<\/div>\n

CSS content_https:\/\/bianchenghao6.com_\u3010CSS \u6559\u7a0b\u3011_\u7b2c2\u5f20 <\/p>\n

\n \u793a\u4f8b-<\/strong>\u4f7f\u7528
\n open-quote<\/strong>\u548c
\n close-quote<\/strong>\u503c\n<\/div>\n
\n \u5982\u679c\u4e0d\u4f7f\u7528
\n close-quote<\/strong>\uff0c\u6211\u4eec\u5c06\u65e0\u6cd5\u5e94\u7528
\n open-quote<\/strong>\u3002\n<\/div>\n
\n
 <!DOCTYPE html>
<html><\/span>
<head><\/span>
    <title><\/span>
        CSS content Property
    <\/title><\/span>
    <style><\/span>
    body {
        text-align: center;
    }
    p {
        font-size: 25px;
    }
    p::before {
        content: open-quote;
    }
    p::after {
        content: close-quote;
    }
    <\/style><\/span>
<\/head><\/span>
<body><\/span>
    <h1><\/span> CSS content property <\/h1><\/span>
    <h2><\/span> Use of content: open-quote; and content: close-quote; <\/h2><\/span>
    <p><\/span> Welcome to the bianchenghao6.com <\/p><\/span>
    <p><\/span> This is another paragraph. <\/p><\/span>
<\/body><\/span>
<\/html><\/span>
<\/span><\/code><\/pre>\n<\/div>\n
\n \u8f93\u51fa<\/strong>\n<\/div>\n

CSS content_https:\/\/bianchenghao6.com_\u3010CSS \u6559\u7a0b\u3011_\u7b2c3\u5f20 <\/p>\n

\n \u793a\u4f8b-<\/strong>\u4f7f\u7528
\n no-open-quote<\/strong>\u548c
\n no-close-quote<\/strong>\u503c\n<\/div>\n
\n \u5728\u6b64\u793a\u4f8b\u4e2d\uff0c\u6211\u4eec\u5e94\u7528\u4e86\u5728\u6bb5\u843d\u5143\u7d20\u4e0a\uff0c\u4ee5\u53ca\u5728\u7c7b\u522b\u4e3a
\n .para <\/strong>\u7684\u6bb5\u843d\u4e0a\uff0c\u4f7f\u7528
\n no-open-quote <\/strong>\u548c
\n close-quote <\/strong>\u3002\n<\/div>\n
\n
 <!DOCTYPE html>
<html><\/span>
<head><\/span>
    <style><\/span>
    body {
        text-align: center;
    }
    p {
        font-size: 25px;
    }
    p::before {
        content: open-quote;
    }
    p::after {
        content: close-quote;
    }
    p.para::before {
        content: no-open-quote;
    }
    p.para::after {
        content: no-close-quote;
    }
    <\/style><\/span>
<\/head><\/span>
<body><\/span>
    <h1><\/span> CSS content property <\/h1><\/span>
    <h2><\/span> Use of content: no-open-quote; and content: no-close-quote; <\/h2><\/span>
    <p><\/span> Welcome to the bianchenghao6.com <\/p><\/span>
    <p class=\"para\"<\/span>> This is another paragraph <\/p><\/span>
<\/body><\/span>
<\/html><\/span>
<\/span><\/code><\/pre>\n<\/div>\n
\n \u8f93\u51fa<\/strong>\n<\/div>\n

CSS content_https:\/\/bianchenghao6.com_\u3010CSS \u6559\u7a0b\u3011_\u7b2c4\u5f20 <\/p>\n

\n \u793a\u4f8b-<\/strong>\u4f7f\u7528
\n attr()<\/strong>\n<\/div>\n
\n attr()<\/strong>\u51fd\u6570\u5141\u8bb8\u6211\u4eec\u63d2\u5165\u7279\u5b9a\u5c5e\u6027\u7684\u503c\u3002\u5982\u679c\u76f8\u5e94\u7684\u5143\u7d20\u6ca1\u6709\u5c5e\u6027\uff0c\u5219\u5c06\u8fd4\u56de\u4e00\u4e2a\u7a7a\u5b57\u7b26\u4e32\u3002\n<\/div>\n
\n \u5728\u6b64\u793a\u4f8b\u4e2d\uff0c\u5c4f\u5e55\u4e0a\u663e\u793a\u7684\u94fe\u63a5\u662f\u4f7f\u7528
\n attr()<\/strong>\u51fd\u6570\n<\/div>\n
\n
 <!DOCTYPE html>
<html><\/span>
<head><\/span>
    <title><\/span>
        CSS content Property
    <\/title><\/span>
    <style><\/span>
    body {
        text-align: center;
    }
    a::after {
        content: attr(href);
    }
    <\/style><\/span>
<\/head><\/span>
<body><\/span>
    <h1><\/span> CSS Content property <\/h1><\/span>
    <h2><\/span> The following link is displayed by using the <b><\/span>attr()<\/b><\/span> <\/h2><\/span>
    <a href=https:\/\/bianchenghao6.com>Click here! <\/a><\/span>
<\/body><\/span>
<\/html><\/span>
<\/span><\/code><\/pre>\n<\/div>\n
\n \u8f93\u51fa<\/strong>\n<\/div>\n

CSS content_https:\/\/bianchenghao6.com_\u3010CSS \u6559\u7a0b\u3011_\u7b2c5\u5f20<\/p>\n","protected":false},"excerpt":{"rendered":"CSS contentzh-cn","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[175],"tags":[],"class_list":["post-2413","post","type-post","status-publish","format-standard","hentry","category-css-jc"],"_links":{"self":[{"href":"https:\/\/bianchenghao6.com\/wp-json\/wp\/v2\/posts\/2413"}],"collection":[{"href":"https:\/\/bianchenghao6.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/bianchenghao6.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/bianchenghao6.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/bianchenghao6.com\/wp-json\/wp\/v2\/comments?post=2413"}],"version-history":[{"count":0,"href":"https:\/\/bianchenghao6.com\/wp-json\/wp\/v2\/posts\/2413\/revisions"}],"wp:attachment":[{"href":"https:\/\/bianchenghao6.com\/wp-json\/wp\/v2\/media?parent=2413"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/bianchenghao6.com\/wp-json\/wp\/v2\/categories?post=2413"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/bianchenghao6.com\/wp-json\/wp\/v2\/tags?post=2413"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}