Not sure what you exactly mean by getting "density-independent pixel from android"..
But CSS pixels are device independent of the physical pixel density. That's why when you use px for sizing an element, it looks the same size across all the devices regardless of what dpi they have.
You can consider it as independent browser pixels that render the pages in some ratio to the actual device pixels.