Skip to content

Commit

Permalink
doc(background-image): add image.
Browse files Browse the repository at this point in the history
  • Loading branch information
shangqunfeng committed Jan 8, 2025
1 parent 7eab4f1 commit d8b4750
Showing 1 changed file with 24 additions and 1 deletion.
25 changes: 24 additions & 1 deletion docs-vuepress/rn-style.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,16 @@ background: linear-gradient(rgba(0, 0, 255, 0.5), rgba(255, 255, 0, 0.5));
/** 2. background-image **/
/* 支持 */
background-image: url("https://res.wx.qq.com/wxdoc/dist/assets/img/0.4cb08bb4.jpg");
background-image: linear-gradient(to top, blue, red)
background-image: linear-gradient(to right bottom, blue, red)
background-image: linear-gradient(45deg, blue, red)
background-image: linear-gradient(45deg, blue 0%, orange 100%)


/* 不支持 */
background-image: linear-gradient(rgba(0, 0, 255, 0.5), rgba(255, 255, 0, 0.5));
background-image: linear-gradient(.25turn, red, blue) // turn单位不支持
background-image: linear-gradient(45deg, red 100px, blue) //px单位不支持


/** 3. background-size **/
Expand All @@ -117,7 +125,22 @@ background-repeat: no-repeat;
background-repeat: repeat;


/** 5. background-color **/
/** 5. background-position **/
background-position: center;
background-position: 10%;
background-position: 10px;
background-position: 10px 20px;
background-position: 10px center;
background-position: right 10px center;
background-position: right 10px bottom 10px;

/* 不支持 */
background-position: 1cm 2cm;
background-position: 10ch 8em;
background-position: right 3em bottom 10px;


/** 6. background-color **/
background-repeat: red;
```

Expand Down

0 comments on commit d8b4750

Please sign in to comment.