How do you make a bridge that opens and closes in Minecraft?

How do you make a bridge that opens and closes in Minecraft?

See also  Why can't I buy Cooking Mama on eShop?