LANG SELRCT

Apps Script Reference  (Create: Create new Spreadsheet | Create new Apps Script

Monday, January 22, 2018

文字列を折り返し表示させない white-space: nowrap


何も指定しないと文字が折り返される


white-space: nowrap を設定すると
文字が折り返されない




コード.gs
function doGet() {
  return HtmlService.createHtmlOutputFromFile("index");
}
意訳
この機能がやること
指定したHTMLファイルを表示する




index.html
<!DOCTYPE html>
<html>
  <head>
    <style>
.nowrap { 
  white-space: nowrap;
}
  </style>
  </head>
  <body>
    <label>いろはにほへとちりぬるをわかよたれそつねならむうゐのおくやまけふこえてあさきゆめみしゑひもせす</label>
    <br>
    <br>
    <label class="nowrap">いろはにほへとちりぬるをわかよたれそつねならむうゐのおくやまけふこえてあさきゆめみしゑひもせす</label>
  </body>
</html>
意訳
これはHTML5文書です



nowrapの
行の折り返しをしない




labelを置く


ラベルを置く → classはnowrap




Latest post

Extracting data from Google Sheets with regular expressions

Introduction Regular expressions are a powerful tool that can be used to extract data from text.  In Google Sheets, regular expressions ca...