<div style="color:red">hello css</div>
<style>
/* 1 */
* {
color: darkgrey;
}
/* 2 */
.container * {
color: blueviolet;
}
/* 3 */
#head {
color: blue
}
/* 4 */
.preference {
color: brown
}
/* 5 */
div p {
color: darkorange
}
/* 6 */
ul {
color: darkseagreen
}
/* 7 */
ul>li {
color: deeppink
}
/* 8 */
ul+span {
color: darkturquoise
}
/* 9 */
ul~a {
color: gold
}
/* 10 */
a[href^='https'] {
color: green
}
/* 11 */
ul li:nth-of-type(2) {
color: indigo
}
/* 12 */
ul li:nth-last-child(1) {
color: indianred
}
</style>
<body>
<!-- 1 -->
<span>*</span>
<div class="container">
<!-- 2 -->
<p>.container *</p>
<!-- 3 -->
<p id='head'>#head</p>
<!-- 4 -->
<p class='preference'>.preference</p>
</div>
<div>
<!-- 5 -->
<p>div p </p>
</div>
<ul>
<!-- 6 -->
ul
<!-- 7 -->
<li>ul>li</li>
<!-- 11 -->
<li>ul li:nth-of-type(2) </li>
<!-- 12 -->
<li>ul li:nth-last-child(1) </li>
</ul>
<!-- 8 -->
<span>ul+span</span>
<br />
<!-- 9 -->
<a href="http://www.4399.com">ul~a</a>
<!-- 10 -->
<a href="https://www.4399.com">a[href^='https']</a>
</body>
copy_info() {
let oInput = document.createElement('input')
oInput.value = `id: ${this.id}, name: "${this.name}"`
document.body.appendChild(oInput)
oInput.select()
document.execCommand('Copy')
this.$message('复制成功!')
},
new Date().toISOString() // => "2021-06-11T07:20:06.642Z"
new Date().toISOString().slice(0,10) // => "2021-06-11"
// set request params
const postRequest = {
url: 'http://localhost:5450/oauth/token.json?', //请求token的接口
method: 'POST',
header: {
'Content-Type': 'application/json'
},
body: {
mode: 'raw',
raw: JSON.stringify({
client_id:"2642d4c1ebed62755b352d2b6a42c9096372450370b387c56f158423e6612552",
client_secret:"17ec1e2ead9b396da8463723b979664d8b2d8d0e7712fafcc97f154c7f0b5d41",
grant_type:"client_credentials",
scope: ""
})
}
};
pm.sendRequest(postRequest, (error, response) => {
error ? console.log(error) : setUserSessionKey(response)
});
// set user_session_key
function setUserSessionKey(response){
var result = response.json()
pm.request.headers.add({
key:"Authorization",
value: "Bearer "+result.access_token
})
}