Riffs can be played against almost any chord progression, not just 12 Bar Blues. In the following example a one bar riff is played against three different minor chords.
The following riff is half a bar long and is played against a common rock progression. The first note of the riff will start on the root note (the letter name) of the chord, e.g., for the G major chord the riff begins on the G note. Use alternate picking throughout.