Example 1 The graph of the function $y=f(x)$ is symmetric to the graph of the function $g(x)=\log _{2} x(x>0)$ with respect to the origin, then the expression for $f(x)$ is ().
(A) $f(x)=\frac{1}{\log _{2} x}(x>0)$
(B) $f(x)=\log _{2}(-x)(x>0)$
(C) $f(x)=-\log _{2} x(x<0)$
(D) $f(x)=-\log _{2}(-x)(x<0)$
The symmetric point of $(x, y)$ with respect to the origin is $(-x,-y)$, so $g(x)=\log _{2} x(x>$ $0) \Rightarrow f(x)=-\log _{2}(-x)(x<0)$, choose D.