How can I modify a flat navigation to more dimention?

If you see the first picture the navigation is flat but the second one has more dimension to it . How can I do that effect to the flat navigation via css?