CSS in Apps Script dialog box

后端 未结 2 1321
广开言路
广开言路 2021-01-07 07:20

I\'m not a web developer and I\'ve only used CSS once in the past. What is the process for using CSS? Is this even possible?

var pointsSheet = SpreadsheetApp.         


        
2条回答
  •  南笙
    南笙 (楼主)
    2021-01-07 07:46

    "Templated HTML" can be used to include a separate CSS file.

    The CSS can be put into a separate Apps Script HTML file. CSS is technically just a

    Then in your main HTML File, put in a scriptlet tag:

    
    

    In your main .gs code file, you need a function named include

    function include(filename) {
      return HtmlService.createHtmlOutputFromFile(filename).getContent();
    };
    

    Also see this stackoverflow question: Google app script : Separating HTML and CSS

提交回复
热议问题