Yes. While there are certain ordering rules for applying capital losses against capital gains, ultimately, long-term capital losses can offset any short-term gains.
A capital loss that is not deductible because it exceeds the annual $3,000 capital loss ceiling. A carryover loss may be deducted from capital gains of later years plus up to $3,000 of ordinary income.