How to add CSS to a webpart in SharePoint 2013?
-
13-12-2020 - |
解决方案
It is advisable to add css in a .txt file and then link it in the Content Editor webpart.
This will make it easier to update the css whenever required without trying to edit the page
Steps:
1) Create a .txt file in SharePoint Designer
2) add your css within the style tag
3) On the page, add the content editor webpart
4) Link the txt file in the Content Editor webpart properties
5) Stop Editing and Save the Page.
其他提示
You can Add CSS using script editor web part by editing page.
- Edit page.
- Add Script editor web part and add CSS snippet in it with style tag.
- Stop Editing and Save the Page
Click here for the more information.