Verse 18 says that Mary was "found" with child, implying that the pregnancy was observed by Joseph, not explained to him by Mary. And this was after Mary had been away visiting Elisabeth for three months! (Luke. 1:56) Surely Joseph was tempted with the same thoughts that we would have been. How could she expect him to believe that this was a virgin birth?
As special as Mary was, she had an equally special young man for a fiance.
How many men would have believed such an incredible story even if an angel had told them in a dream? It took more faith on Joseph's part than it did on Mary's.
This is the way it always is. Those who hear of the vision or call of God second hand have to exhibit an even greater faith than the person who received the word from the Lord directly.
The scriptures don't mention whether or not Mary ever attempted to convince Joseph of the truth. What would have been the use? Only God could make someone believe a story like this. It is to Mary's credit that she trusted God and to Joseph's credit that he believed God. We can only do as the Lord bids and trust God to take care of the rest.