Use , and .
Normally I first build the bridge, then attach to it.
Install bridge types, with vanilla the results are - well... not looking so good.
3x . to go up, then 3x Shift + . to go a little more up. Or just 4x .
Build a straight, choose a fitting type.
With the above mod you also get fitting bridgehead assets.
An Imgur album of bridges I created last year: https://imgur.com/a/KKJvSS0
1. Initiate required build option (rail or road)
2. Place the little white ball cursor where you want the flat top of your bridge to start
3. Tap "." which will turn the little white ball gray and levitate it a step off the ground
4. Tap again to levitate again, and again, until desires height of bridge is reached
5. Holding shift while tapping "." will levitate it in small steps
6. "," works the same except lowers the ball in steps
7. Once desired (or legal) height is found, drag the road/rail across to desired end point of flat bridge top.
8. It is still possible to use the standard up/down arrow icons as normal to make a slope if desired before you confirm.
9. Finished the flat top section and you can then work on the approach gradient section/connections.