文章加密

;

2022年5月23日 星期一

DPI Scaling make "border: 1px solid #ccc" thinkness inconsistent

 https://stackoverflow.com/questions/71674803/html-tables-has-a-weird-bold-horizontal-line-due-to-border-collapse-property


If you have a 1px border and DPI Scaling set to, for example 150%, the border would technically be 1.5px. Because the browser doesn't use sub-pixel rendering, it alternates between 1px and 2px.


There are multiple ways to deal with it.


1. Set the border-width to 0.01px

A quick and dirty workaround, because the Browser will fallback to at least 1px


2. Use resolution media queries

Change the border-width to the appropriate decimal per scaling level.

@media (min-resolution: 120dpi) {
  table, th, td {
    border-width: 0.75px;
  }
}

@media (min-resolution: 144dpi) {
  table, th, td {
    border-width: 0.666px;
  }
}

@media (min-resolution: 192dpi) {
  table, th, td {
    border-width: 0.5px;
  }
}

Here's an overview of the different DPI Scaling Levels and their values

DPI Scaling Level

  • Smaller 100% (default) = 96 dpi
  • Medium 125% = 120 dpi
  • Larger 150% = 144 dpi
  • Extra Large 200% = 192 dpi

3. JavaScript

Change the border-width to the appropriate decimal per scaling level with JavaScript using the window.devicePixelRatio variable.

2022年3月30日 星期三

讓網頁不被google search 找到

 

https://developers.google.com/search/docs/advanced/robots/robots_meta_tag?hl=zh-tw
讓網頁不被google search 找到

2021年11月1日 星期一

web3.js - Ethereum JavaScript API, DApp

 https://ethereum.org/en/developers/docs/apis/javascript/


https://web3js.readthedocs.io/en/v1.5.2/getting-started.html


https://ithelp.ithome.com.tw/articles/10202409


https://ethereum.org/zh/developers/docs/intro-to-ethereum/  介紹   看到我们把这些被上传至网络并由网络执行的程序称为智能合约。

2021年10月21日 星期四

bazaavoice

 https://developer.bazaarvoice.com/conversations-api/reference/v5.4-prr/statistics/statistics-display

2021年10月19日 星期二