How to calculate the view’s height or length for adaptation device

let’me see ,some times we use the px on my page denotation the height or length

but we know on Android divece the px not popular .How to calculate the view’s height or length on device’realy values?

eg: my page On Google Chrome browser ,the tabs h is 100px , actually ,I want it display on device is 100px .

t

but
Android_device_capture_screen (Device display is 2048 x 1536 pixels) the display is 166 px

**Css **

.tabs {
    
    height: 100px;  // 


}

How to calculate this value ?

this code on github https://github.com/longtaoge/ScreenFit/tree/master