You use if in conditional sentences to introduce the circumstances in which an event or situation might happen, might be happening, or might have happened.
She gets very upset if I exclude her from anything.
如果有什么事我将她排除在外,她就会非常难过。
You can go if you want.
如果你想走就走吧。
You use if in indirect questions where the answer is either 'yes' or 'no'.
He asked if I had left with you, and I said no.
他问我是不是和你一起离开的,我说不是。
You use if to suggest that something might be slightly different from what you are stating in the main part of the sentence, for example, that there might be slightly more or less of a particular quality.
Sometimes that standard is quite difficult, if not impossible, to achieve.
有时那个标准,即使并非不可能,也是很难达到的。
You use if, usually with 'can', 'could', 'may', or 'might', in a conversation when you are politely trying to make a point, change the subject, or interrupt another speaker.
If I could just make another small point about the weightlifters in the Olympics.
请允许我就奥运会的举重运动员们再稍说一句。
You use if at or near the beginning of a clause when politely asking someone to do something.
I wonder if you'd be kind enough to give us some information, please?
不知能否请您向我们提供些信息?
You use if to introduce a subordinate clause in which you admit a fact that you regard as less important than the statement in the main clause.
If there was any disappointment it was probably temporary.
即使有什么遗憾,可能也是暂时的。
if not
You use if not in front of a word or phrase to indicate that your statement does not apply to that word or phrase, but to something closely related to it that you also mention.
She understood his meaning, if not his words, and took his advice.
她即便不懂他的语言,也明白了他的意思,并且接受了他的建议。
if ever
You use if ever with past tenses when you are introducing a description of a person or thing, to emphasize how appropriate it is.
I became a distraught, worried mother, a useless role if ever there was one.
如果有个心烦意乱、忧心忡忡的母亲,一个完全无用的角色,那就是我。
if only
You use if only with past tenses to introduce what you think is a fairly good reason for doing something, although you realize it may not be a very good one.
She always writes me once a month, if only to scold me because I haven't answered her last letter yet.
她总是一个月写一封信给我,即使仅仅是为了责备我还没有回她的上一封信。
You use if only to express a wish or desire, especially one that cannot be fulfilled.
If only you had told me that some time ago.
要是你之前告诉我那件事该多好。
as if
You use as if when you are making a judgment about something that you see or notice. Your belief or impression might be correct, or it might be wrong.
It looked as if she had forgotten how to breathe.
她看上去好像是忘了如何呼吸似的。
You use as if to describe something or someone by comparing them with another thing or person.
He points two fingers at his head, as if he were holding a gun.
他用两个手指对着自己的脑袋,仿佛正拿着一把枪。
You use as if to emphasize that something is not true.
Getting my work done! My God! As if it mattered.
把我的活儿干完!我的天哪!好像这很要紧似的。